upload
parent
5851bfde6d
commit
45e38873d9
|
@ -49,7 +49,7 @@ public class ParamBuilder {
|
|||
ktRoleLogin.setParam_data(KtEventUtils.dataBuild(uid));
|
||||
ktRoleLogin.setParam_environment(KtEventUtils.simpleEnviromentBuild(uid));
|
||||
ktRoleLogin.setParam_user(KtEventUtils.userBuild(user));
|
||||
ktRoleLogin.setParam_role(KtEventUtils.roleBuild(user));
|
||||
ktRoleLogin.setParam_role(KtEventUtils.roleForLoginOrLogoutBuild(user));
|
||||
ktRoleLogin.setParam_event(paramEventBean);
|
||||
ktRoleLogin.getParam_data().setCategory_s(LoginParamType.DATA_CATEGORY_ROLE);
|
||||
return ktRoleLogin;
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
|||
import com.ljsd.jieling.ktbeans.parmsBean.*;
|
||||
import com.ljsd.jieling.logic.dao.PlayerManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -122,6 +123,12 @@ public class KtEventUtils {
|
|||
return KTRoleUtil.getRoleById(user);
|
||||
}
|
||||
|
||||
public static ParamRoleBean roleForLoginOrLogoutBuild(User user){
|
||||
ParamRoleBean paramRoleBean = KTRoleUtil.getRoleById(user);
|
||||
paramRoleBean.setEco_force_11_a(HeroLogic.getInstance().getEcoForce11A(user));
|
||||
return paramRoleBean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ public class ParamRoleBean {
|
|||
private int vip_level_i;
|
||||
private String currency_1_d;
|
||||
private String currency_2_d;
|
||||
private String eco_force_11_a;
|
||||
|
||||
public String getRole_id_s() {
|
||||
return role_id_s;
|
||||
|
@ -72,4 +73,12 @@ public class ParamRoleBean {
|
|||
public void setCurrency_2_d(String currency_2_d) {
|
||||
this.currency_2_d = currency_2_d;
|
||||
}
|
||||
|
||||
public String getEco_force_11_a() {
|
||||
return eco_force_11_a;
|
||||
}
|
||||
|
||||
public void setEco_force_11_a(String eco_force_11_a) {
|
||||
this.eco_force_11_a = eco_force_11_a;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1648,4 +1648,37 @@ public class HeroLogic {
|
|||
MessageUtil.sendMessage(session,1,MessageTypeProto.MessageType.RINGFIRE_ADVANCED_RESPONSE_VALUE,null,true);
|
||||
}
|
||||
|
||||
|
||||
public String getEcoForce11A(User user){
|
||||
StringBuilder append = new StringBuilder().append("[");
|
||||
append.append(calAllPokenmonForce(user));
|
||||
getTeamForceForUpload(append, user.getTeamPosManager().getTeamPosForHero().get(1),user);
|
||||
getTeamForceForUpload(append, user.getTeamPosManager().getTeamPosForHero().get( GlobalsDef.TEAM_ARENA_DEFENSE),user);
|
||||
append.append("]");
|
||||
return append.toString();
|
||||
}
|
||||
|
||||
public void getTeamForceForUpload( StringBuilder append, List<TeamPosHeroInfo> teamPosHeroInfoList,User user){
|
||||
if(teamPosHeroInfoList != null &&!teamPosHeroInfoList.isEmpty()){
|
||||
HeroManager heroManager = user.getHeroManager();
|
||||
Map<String, Hero> heroMap = heroManager.getHeroMap();
|
||||
Map<Integer,Integer> heroPosMap = new HashMap<>(5);
|
||||
for(TeamPosHeroInfo teamPosHeroInfo: teamPosHeroInfoList){
|
||||
String heroId = teamPosHeroInfo.getHeroId();
|
||||
Hero hero = heroMap.get(heroId);
|
||||
heroPosMap.put(teamPosHeroInfo.getPosition(),calHeoForce(user,hero,false));
|
||||
}
|
||||
for(int i=1;i<6;i++){
|
||||
Integer force = heroPosMap.get(i);
|
||||
if(force == null){
|
||||
force=0;
|
||||
}
|
||||
append.append(",").append(force);
|
||||
}
|
||||
}else{
|
||||
for(int i=1;i<6;i++){
|
||||
append.append(",").append(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue