公会战战力修改
parent
494c3dbe17
commit
f708a2f546
|
@ -62,7 +62,6 @@ public class BloodLogic {
|
|||
teamPosHeroInfos = teamPosManager.getTeamPosForHero().get(1);
|
||||
teamId = 1;
|
||||
}
|
||||
int force = HeroLogic.getInstance().calTeamTotalForce(user, teamId, false);
|
||||
Iterator<TeamPosHeroInfo> it = teamPosHeroInfos.iterator();
|
||||
Map<String, FamilyHeroInfo> heroAllAttribute = new HashMap<>();
|
||||
while (it.hasNext()) {
|
||||
|
@ -75,7 +74,7 @@ public class BloodLogic {
|
|||
heroAttributeMap = CombatLogic.getInstance().bufferOneHeroAttrAfterEat(heroAttributeMap,buffInfo[i]);
|
||||
}
|
||||
}
|
||||
heroAllAttribute.put(heroInfo.getHeroId(), new FamilyHeroInfo(hero.getTemplateId(), hero.getLevel(), heroAttributeMap,force));
|
||||
heroAllAttribute.put(heroInfo.getHeroId(), new FamilyHeroInfo(hero.getTemplateId(), hero.getLevel(), heroAttributeMap));
|
||||
}
|
||||
return heroAllAttribute;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ public class FamilyFightInfo {
|
|||
private int familyId;
|
||||
private int buildId;
|
||||
private int starCount;
|
||||
private int force;
|
||||
|
||||
public Map<String, FamilyHeroInfo> getHeroAttribute() {
|
||||
return heroAttribute;
|
||||
|
@ -48,4 +49,12 @@ public class FamilyFightInfo {
|
|||
public void setStarCount(int starCount) {
|
||||
this.starCount = starCount;
|
||||
}
|
||||
|
||||
public int getForce() {
|
||||
return force;
|
||||
}
|
||||
|
||||
public void setForce(int force) {
|
||||
this.force = force;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ public class FamilyHeroInfo {
|
|||
private int templeteId;
|
||||
private int level;
|
||||
private Map<Integer,Integer> attribute;
|
||||
private int force;
|
||||
|
||||
public int getTempleteId() {
|
||||
return templeteId;
|
||||
|
@ -33,19 +32,10 @@ public class FamilyHeroInfo {
|
|||
this.attribute = attribute;
|
||||
}
|
||||
|
||||
public FamilyHeroInfo(int templeteId, int level, Map<Integer, Integer> attribute,int force) {
|
||||
public FamilyHeroInfo(int templeteId, int level, Map<Integer, Integer> attribute) {
|
||||
this.templeteId = templeteId;
|
||||
this.level = level;
|
||||
this.attribute = attribute;
|
||||
this.force = force;
|
||||
}
|
||||
|
||||
public int getForce() {
|
||||
return force;
|
||||
}
|
||||
|
||||
public void setForce(int force) {
|
||||
this.force = force;
|
||||
}
|
||||
|
||||
public FamilyHeroInfo() {
|
||||
|
|
|
@ -187,20 +187,17 @@ public class GuildFightLogic {
|
|||
fightInfo.addBuildBuff(buffInfo);
|
||||
}
|
||||
for (Map.Entry<Integer, FamilyFightInfo> entry : fightValues.entrySet()) {
|
||||
int force = HeroLogic.getInstance().calTeamTotalForce(UserManager.getUser(entry.getKey()), 501, false);
|
||||
if(force==0){
|
||||
force = HeroLogic.getInstance().calTeamTotalForce(UserManager.getUser(entry.getKey()), 1, false);
|
||||
}
|
||||
Family.FamilyFightPlayerInfo.Builder playerInfo = Family.FamilyFightPlayerInfo.newBuilder();
|
||||
playerInfo.setBuildId(entry.getValue().getBuildId());
|
||||
playerInfo.setStarCount(fightValues.get(entry.getKey()).getStarCount());
|
||||
PlayerInfoCache player = RedisUtil.getInstence().getMapEntry(RedisKey.PLAYER_INFO_CACHE, "", String.valueOf(entry.getKey()), PlayerInfoCache.class);
|
||||
FamilyFightInfo forceInfo = RedisUtil.getInstence().getMapEntry(RedisKey.FAMILY_FIGHT, String.valueOf(guildId), String.valueOf(entry.getKey()), FamilyFightInfo.class);
|
||||
Family.FamilyUserInfo.Builder userInfo = Family.FamilyUserInfo.newBuilder()
|
||||
.setRoleUid(entry.getKey())
|
||||
.setUserName(player.getName())
|
||||
.setUserLevel(player.getLevel())
|
||||
.setPosition(player.getGuildPosition())
|
||||
.setSoulForce(force)
|
||||
.setSoulForce(forceInfo.getForce())
|
||||
.setHead(player.getHead())
|
||||
.setFrame(player.getHeadFrame())
|
||||
.setContribute(0);
|
||||
|
@ -294,10 +291,17 @@ public class GuildFightLogic {
|
|||
int[] buffInfo = redisUtil.getMapEntry(RedisKey.FAMILY_FIGHT_BUFF, gid.toString(), entry.getValue().toString(), int[].class);
|
||||
FamilyFightInfo fightInfo = new FamilyFightInfo();
|
||||
//血量处理,buff处理
|
||||
|
||||
|
||||
int force = HeroLogic.getInstance().calTeamTotalForce(user, 501, false);
|
||||
if(force==0){
|
||||
force = HeroLogic.getInstance().calTeamTotalForce(user, 1, false);
|
||||
}
|
||||
Map<String, FamilyHeroInfo> heroAllAttribute = BloodLogic.getInstance().battleRecord(user, 501, buffInfo);
|
||||
fightInfo.setHeroAttribute(heroAllAttribute);
|
||||
fightInfo.setBuildId(entry.getValue());
|
||||
fightInfo.setStarCount(guildSetting.getStarNum()[memberType-1]);
|
||||
fightInfo.setForce(force);
|
||||
redisUtil.putMapEntry(RedisKey.FAMILY_FIGHT, String.valueOf(guildInfo.getId()), String.valueOf(entry.getKey()), fightInfo);
|
||||
familyTotalStar+=fightInfo.getStarCount();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue