Merge branch 'master' of 60.1.1.230:backend/jieling_server

back_recharge
wangyuan 2019-09-17 19:31:03 +08:00
commit 5048fb2238
7 changed files with 423070 additions and 28 deletions

View File

@ -95,17 +95,13 @@ public class ChatLogic {
int uid = iSession.getUid();
User user = UserManager.getUser(uid);
PlayerManager playerInfoManager = user.getPlayerInfoManager();
if(playerInfoManager.getSilence()==1){
MessageUtil.sendErrorResponse(iSession,0,msgId,"您已被系统禁言");
return;
}
FriendManager friendManager = user.getFriendManager();
long nowTime = System.currentTimeMillis();
String tmp = SensitivewordFilter.replaceSensitiveWord(message, 1, "*");
if(!tmp.equals(message)){
if(!tmp.equals(message)||playerInfoManager.getSilence()==1){
ChatProto.ChatInfo chatInfo = CBean2Proto.getChatInfoBuilder(user,tmp,nowTime,-1);
ChatProto.SendChatInfoResponse response = ChatProto.SendChatInfoResponse.newBuilder().setChatInfo(chatInfo).build();
MessageUtil.sendMessage(iSession,1,msgId,response,true);

View File

@ -176,6 +176,7 @@ public class RedisKey {
public static final String BLOODY_PERSON_BATTLE_INFO = "BLOODY_PERSON_BATTLE_INFO";
public static final String MATCH_SERVER_INFO = "MATCH_SERVER_INFO";
public static final String LOGIC_SERVER_INFO = "LOGIC_SERVER_INFO";
public static final String BLOODY_SERVER_INFO = "BLOODY_SERVER_INFO";
public final static String CDKEY = "CDKEY";
@ -194,7 +195,7 @@ public class RedisKey {
familyKey.add(FAMILY_FIGHT_TOTAL_EXP);
}
public static String getKey(String type, String key, boolean withoutServerId) {
if(RedisKey.TOKEN.equals(type)||RedisKey.USER_SERVER_INFO.equals(type)){
if(RedisKey.TOKEN.equals(type)||RedisKey.USER_SERVER_INFO.equals(type)||familyKey.contains(type)){
return type + RedisKey.Delimiter_colon + key;
}

View File

@ -102,7 +102,7 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
UserRecentLoginInfo userRecentLoginInfo = new UserRecentLoginInfo(System.currentTimeMillis()/1000,user.getPlayerInfoManager().getLevel()
,user.getPlayerInfoManager().getRootId()
,user.getPlayerInfoManager().getNickName());
RedisUtil.getInstence().putMapEntry(RedisKey.USER_SERVER_INFO,user.getPlayerInfoManager().getOpenId(),String.valueOf(GameApplication.serverId),userRecentLoginInfo);
RedisUtil.getInstence().putMapEntry(RedisKey.USER_SERVER_INFO,openIdFront,String.valueOf(GameApplication.serverId),userRecentLoginInfo);
PlayerInfoProto.LoginResponse loginResponse
= PlayerInfoProto.LoginResponse.newBuilder()

View File

@ -16,7 +16,7 @@ class RechargeSumActivity extends AbstractActivity {
@Override
void updateProgress(ActivityMission activityMission, int count) {
activityMission.setValue(count);
activityMission.setValue(count+activityMission.getValue());
}
@Override

View File

@ -119,29 +119,35 @@ public class CombatLogic {
MapManager mapManager = user.getMapManager();
Map<String, Map<Integer, Integer>> heroAllAttributeMap = bufferAddByEatFoodOrEventTrigger(foodIdOrEventId, mapManager.getHeroAllAttributeMap());
mapManager.setHeroAllAttributeMap(heroAllAttributeMap);
if(SChallengeConfig.sChallengeConfigs.get(user.getMapManager().getCurMapId()).getType()==4){
for(Map.Entry<String, Map<Integer, Integer>> entry:heroAllAttributeMap.entrySet()){
int per =(int) (entry.getValue().get(HeroAttributeEnum.CurHP.getPropertyId()) / (double) entry.getValue().get(HeroAttributeEnum.Hp.getPropertyId())*10000);
user.getMapManager().updateEndlessHeroHp(entry.getKey(),per);
}
}
SFoodsConfig sFoodsConfig = SFoodsConfig.getsFoodsConfigByFoodId(foodIdOrEventId);
int contiue = sFoodsConfig.getContiue();
if(contiue==0){
contiue=-1;
int teamId = mapManager.getTeamId();
List<TeamPosHeroInfo> teamPosHeroInfoList = user.getTeamPosManager().getTeamPosForHero().get(teamId);
Map<Integer,Integer> foodAddMap = new HashMap<>();
getFoodAttributeAdd(GlobalsDef.FOOD_ADDITION_BATTLE_TYPE, GlobalsDef.FOOD_EAT_AFFECT_PERSON, foodAddMap, sFoodsConfig);
for (TeamPosHeroInfo heroInfo : teamPosHeroInfoList) {
Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
if (hero == null) {
continue;
}
Map<Integer, Integer> heroAllAttribute = user.getMapManager().getHeroAllAttributeByHeroId(hero.getId());
if(heroAllAttribute == null || heroAllAttribute.get(HeroAttributeEnum.CurHP.getPropertyId()) <= 0){
continue;
}
HeroLogic.getInstance().combinedAttribute(foodAddMap,heroAllAttribute);
HeroLogic.getInstance().calInteractAdd(heroAllAttribute);
heroAllAttributeMap.put(hero.getId(), heroAllAttribute);
}
mapManager.setHeroAllAttributeMap(heroAllAttributeMap);
// int teamId = mapManager.getTeamId();
// List<TeamPosHeroInfo> teamPosHeroInfoList = user.getTeamPosManager().getTeamPosForHero().get(teamId);
// Map<Integer,Integer> foodAddMap = new HashMap<>();
// getFoodAttributeAdd(GlobalsDef.FOOD_ADDITION_BATTLE_TYPE, GlobalsDef.FOOD_EAT_AFFECT_PERSON, foodAddMap, sFoodsConfig);
// for (TeamPosHeroInfo heroInfo : teamPosHeroInfoList) {
// Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
// if (hero == null) {
// continue;
// }
// Map<Integer, Integer> heroAllAttribute = user.getMapManager().getHeroAllAttributeByHeroId(hero.getId());
// if(heroAllAttribute == null || heroAllAttribute.get(HeroAttributeEnum.CurHP.getPropertyId()) <= 0){
// continue;
// }
//
// HeroLogic.getInstance().combinedAttribute(foodAddMap,heroAllAttribute);
// HeroLogic.getInstance().calInteractAdd(heroAllAttribute);
// heroAllAttributeMap.put(hero.getId(), heroAllAttribute);
// }
// mapManager.setHeroAllAttributeMap(heroAllAttributeMap);
}
mapManager.eatFood(foodIdOrEventId,contiue);
}

View File

@ -185,7 +185,7 @@ public class BuyGoodsLogic {
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RechargeTotal,rechargeInfo.getSaveAmt());
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.LUCKYCAT,price);
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.DAILY_RECHARGE,price);
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RECHARGE_NUM,rechargeInfo.getSaveAmt());
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RECHARGE_NUM,price);
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RECHARGE_SUM_DAY, user.getPlayerInfoManager().getRechargedaily());
}

File diff suppressed because it is too large Load Diff