Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
e5d58a9f32
|
@ -117,6 +117,8 @@ public class CumulationData {
|
||||||
|
|
||||||
public int takeFriendGifts;//领取好友赠礼次数
|
public int takeFriendGifts;//领取好友赠礼次数
|
||||||
|
|
||||||
|
public int joinFamilyCount;//加入公会次数
|
||||||
|
|
||||||
public Map<Integer,Integer> especialEquipStar = new HashMap<>();//法宝升到%s星级的数量为
|
public Map<Integer,Integer> especialEquipStar = new HashMap<>();//法宝升到%s星级的数量为
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ import com.ljsd.jieling.logic.OnlineUserManager;
|
||||||
import com.ljsd.jieling.logic.dao.*;
|
import com.ljsd.jieling.logic.dao.*;
|
||||||
import com.ljsd.jieling.logic.dao.root.*;
|
import com.ljsd.jieling.logic.dao.root.*;
|
||||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||||
|
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
import com.ljsd.jieling.protocols.CommonProto;
|
import com.ljsd.jieling.protocols.CommonProto;
|
||||||
|
@ -502,6 +503,7 @@ public class GuildLogic {
|
||||||
PlayerInfoCache cache = RedisUtil.getInstence().getMapEntry(RedisKey.PLAYER_INFO_CACHE, "", String.valueOf(applyId), PlayerInfoCache.class);
|
PlayerInfoCache cache = RedisUtil.getInstence().getMapEntry(RedisKey.PLAYER_INFO_CACHE, "", String.valueOf(applyId), PlayerInfoCache.class);
|
||||||
cache.setGuildPosition(GlobalsDef.MEMBER);
|
cache.setGuildPosition(GlobalsDef.MEMBER);
|
||||||
RedisUtil.getInstence().putMapEntry(RedisKey.PLAYER_INFO_CACHE,"",String.valueOf(applyId),cache);
|
RedisUtil.getInstence().putMapEntry(RedisKey.PLAYER_INFO_CACHE,"",String.valueOf(applyId),cache);
|
||||||
|
targetUser.getUserMissionManager().onGameEvent(targetUser, GameEvent.JOIN_FAMILY);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
LOGGER.error("the exception={}",e);
|
LOGGER.error("the exception={}",e);
|
||||||
}finally {
|
}finally {
|
||||||
|
|
|
@ -67,7 +67,7 @@ public enum GameEvent {
|
||||||
FIND_STAR,//占星
|
FIND_STAR,//占星
|
||||||
|
|
||||||
TAKE_FRIEND_GIFT,//领取好友赠礼
|
TAKE_FRIEND_GIFT,//领取好友赠礼
|
||||||
|
JOIN_FAMILY,//加入公会次数
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,7 @@ public enum MissionType {
|
||||||
ESPECIAL_EQUIP(62),//拥有%s星级法宝的数量为:%s
|
ESPECIAL_EQUIP(62),//拥有%s星级法宝的数量为:%s
|
||||||
FIND_STAR(65),//占星
|
FIND_STAR(65),//占星
|
||||||
TAKE_FRIEND_GIFT(66),//领取好友友情点
|
TAKE_FRIEND_GIFT(66),//领取好友友情点
|
||||||
|
JOIN_FAMILY(69),
|
||||||
;
|
;
|
||||||
|
|
||||||
private int missionType;
|
private int missionType;
|
||||||
|
@ -225,6 +226,8 @@ public enum MissionType {
|
||||||
return FIND_STAR;
|
return FIND_STAR;
|
||||||
case 66:
|
case 66:
|
||||||
return TAKE_FRIEND_GIFT;
|
return TAKE_FRIEND_GIFT;
|
||||||
|
case 69:
|
||||||
|
return JOIN_FAMILY;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ public class DataManagerDistributor {
|
||||||
judges.put(MissionType.FIND_STAR,new FindStarManager());
|
judges.put(MissionType.FIND_STAR,new FindStarManager());
|
||||||
|
|
||||||
judges.put(MissionType.TAKE_FRIEND_GIFT,new TakeFriendGiftTimesManager());
|
judges.put(MissionType.TAKE_FRIEND_GIFT,new TakeFriendGiftTimesManager());
|
||||||
|
judges.put(MissionType.JOIN_FAMILY,new JoinFamilyCountManager());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.ljsd.jieling.logic.mission.data;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.logic.dao.CumulationData;
|
||||||
|
import com.ljsd.jieling.logic.mission.MissionType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lvxinran
|
||||||
|
* @date 2019/11/2
|
||||||
|
* @discribe
|
||||||
|
*/
|
||||||
|
public class JoinFamilyCountManager implements BaseDataManager {
|
||||||
|
@Override
|
||||||
|
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||||
|
data.joinFamilyCount++;
|
||||||
|
return new CumulationData.Result(missionType);
|
||||||
|
}
|
||||||
|
}
|
|
@ -274,6 +274,11 @@ public class MissionEventDistributor {
|
||||||
eventEnumListMap.put(GameEvent.TAKE_FRIEND_GIFT,typeList);
|
eventEnumListMap.put(GameEvent.TAKE_FRIEND_GIFT,typeList);
|
||||||
eventProcessor.put(GameEvent.TAKE_FRIEND_GIFT,new CumulationDataEventProcessor());
|
eventProcessor.put(GameEvent.TAKE_FRIEND_GIFT,new CumulationDataEventProcessor());
|
||||||
|
|
||||||
|
typeList = new ArrayList<>();
|
||||||
|
typeList.add(MissionType.JOIN_FAMILY);
|
||||||
|
eventEnumListMap.put(GameEvent.JOIN_FAMILY,typeList);
|
||||||
|
eventProcessor.put(GameEvent.JOIN_FAMILY,new CumulationDataEventProcessor());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
private static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
||||||
|
|
|
@ -577,7 +577,7 @@ public class ItemUtil {
|
||||||
levelUpExp = sPlayerLevelConfig.getExp();
|
levelUpExp = sPlayerLevelConfig.getExp();
|
||||||
}
|
}
|
||||||
while (curExp >= levelUpExp && curExp <= maxExp) {
|
while (curExp >= levelUpExp && curExp <= maxExp) {
|
||||||
playerInfoManager.setLevel(playerInfoManager.getLevel() + 1);
|
|
||||||
Poster.getPoster().dispatchEvent(new UserLevelEvent(user.getId(),playerInfoManager.getLevel()));
|
Poster.getPoster().dispatchEvent(new UserLevelEvent(user.getId(),playerInfoManager.getLevel()));
|
||||||
if(playerInfoManager.getLevel()==2&&playerInfoManager.getNickName().equals(String.valueOf(playerInfoManager.getRootId()))){
|
if(playerInfoManager.getLevel()==2&&playerInfoManager.getNickName().equals(String.valueOf(playerInfoManager.getRootId()))){
|
||||||
//TODO 走表
|
//TODO 走表
|
||||||
|
@ -594,10 +594,11 @@ public class ItemUtil {
|
||||||
if (sPlayerLevelConfig == null) {
|
if (sPlayerLevelConfig == null) {
|
||||||
levelUpExp = Integer.MAX_VALUE;
|
levelUpExp = Integer.MAX_VALUE;
|
||||||
} else {
|
} else {
|
||||||
levelUpExp = sPlayerLevelConfig.getExp();
|
|
||||||
if (curExp >= sPlayerLevelConfig.getExp()) {
|
if (curExp >= sPlayerLevelConfig.getExp()) {
|
||||||
sPlayerLevelConfig = SPlayerLevelConfig.getsPlayerLevelConfigMap().get(playerInfoManager.getLevel() - 1);
|
|
||||||
curExp = curExp - sPlayerLevelConfig.getExp();
|
curExp = curExp - sPlayerLevelConfig.getExp();
|
||||||
|
playerInfoManager.setLevel(playerInfoManager.getLevel() + 1);
|
||||||
|
sPlayerLevelConfig = SPlayerLevelConfig.getsPlayerLevelConfigMap().get(playerInfoManager.getLevel());
|
||||||
|
levelUpExp = sPlayerLevelConfig.getExp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.ROLE_LEVEUP_EVENT);
|
Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.ROLE_LEVEUP_EVENT);
|
||||||
|
|
Loading…
Reference in New Issue