back_recharge
zhangshanxue 2019-09-20 17:40:41 +08:00
commit e1c8e2fdc6
4 changed files with 7 additions and 8 deletions

View File

@ -2331,7 +2331,7 @@ public class MapLogic {
User user = UserManager.getUser(uid);
String fightKey = RedisKey.getKey(RedisKey.CHALLENGE_MONSTER_INFO, String.valueOf(uid), false);
String fightInfos = (String) RedisUtil.getInstence().get(fightKey);
if (fightInfos.isEmpty()) {
if (fightInfos == null|| fightInfos.isEmpty()) {
LOGGER.info("endFight() uid=>{} fightKey={},fightId={} fightInfos == null", uid, fightKey);
MessageUtil.sendErrorResponse(session, 0, messageType.getNumber(), "");
return;

View File

@ -198,8 +198,11 @@ public class ActivityLogic {
if (null==abstractActivity) {
continue;
}
abstractActivity .onActivityEndSelfWithDealReward(user);
abstractActivity.onActivityEndSelfWithDealReward(user);
activityManager.removeActivity(activityId);
if(sGlobalActivity.getShopId()!=0){
user.getStoreManager().removeStoreInfo(sGlobalActivity.getShopId());
}
LOGGER.info("the uid={},remove the activity id ={}", user.getId(), activityId);
if (builder != null) {
builder.addCloseActivityId(activityId);

View File

@ -1301,11 +1301,7 @@ public class HeroLogic {
public int calHeoForce(User user, Hero hero,boolean isMyself){
Map<Integer, Integer> heroAllAttribute;
if(!isMyself || user.getMapManager().getCurMapId() == 0){
heroAllAttribute=calHeroNotBufferAttribute(user, hero,true,0);
}else{
heroAllAttribute = calHeroFinalAttributeWhenInMap(user, hero,true,0);
}
heroAllAttribute = calHeroFinalAttributeWhenInMap(user, hero,true,0);
//战力保存
int force = calForce(heroAllAttribute);
return force + heroAllAttribute.get(HeroAttributeEnum.EquipForce.getPropertyId());

View File

@ -271,7 +271,7 @@ public class PlayerLogic {
int uid = iSession.getUid();
User user = UserManager.getUser(uid);
if(user.getTeamPosManager().getTeamPosForHero().containsKey(teamId)){
int teamForce = HeroLogic.getInstance().calTeamTotalForce(user, teamId, true);
int teamForce = HeroLogic.getInstance().calTeamTotalForce(user, teamId, false);
if(user.getPlayerInfoManager().getMaxForce() < teamForce){
user.getPlayerInfoManager().setMaxForce(teamForce);
String key = RedisKey.getKey(RedisKey.FORCE_RANK, "", false);