好友任务
parent
73d07c8754
commit
3d6c621618
|
@ -116,6 +116,8 @@ public class CumulationData {
|
|||
|
||||
public int joinFamilyCount;//加入公会次数
|
||||
|
||||
public int friendApplyCount;//提出好友申请次数
|
||||
|
||||
public Map<Integer,Integer> especialEquipStar = new HashMap<>();//法宝升到%s星级的数量为
|
||||
|
||||
|
||||
|
|
|
@ -267,6 +267,7 @@ public class FriendLogic {
|
|||
friendManager.addApplyFriend(uid);
|
||||
user.getFriendManager().addMyApplyFriend(inviteUid);
|
||||
sendFriendInfoIndication(uid,inviteUid,1);
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.FRIEND_APPLY);
|
||||
}
|
||||
MessageUtil.sendMessage(iSession, 1, msgId, null, true);
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ public enum GameEvent {
|
|||
|
||||
TAKE_FRIEND_GIFT,//领取好友赠礼
|
||||
JOIN_FAMILY,//加入公会次数
|
||||
FRIEND_APPLY,//提出好友申请次数
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ public enum MissionType {
|
|||
FIND_STAR(65),//占星
|
||||
TAKE_FRIEND_GIFT(66),//领取好友友情点
|
||||
JOIN_FAMILY(69),
|
||||
FRIEND_APPLY(71),//提出%s次好友申请
|
||||
;
|
||||
|
||||
private int missionType;
|
||||
|
@ -228,6 +229,8 @@ public enum MissionType {
|
|||
return TAKE_FRIEND_GIFT;
|
||||
case 69:
|
||||
return JOIN_FAMILY;
|
||||
case 71:
|
||||
return FRIEND_APPLY;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -106,6 +106,7 @@ public class DataManagerDistributor {
|
|||
|
||||
judges.put(MissionType.TAKE_FRIEND_GIFT,new TakeFriendGiftTimesManager());
|
||||
judges.put(MissionType.JOIN_FAMILY,new JoinFamilyCountManager());
|
||||
judges.put(MissionType.FRIEND_APPLY,new FriendApplyManager());
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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/12/17
|
||||
* @discribe
|
||||
*/
|
||||
public class FriendApplyManager implements BaseDataManager {
|
||||
@Override
|
||||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||
data.friendApplyCount++;
|
||||
return new CumulationData.Result(missionType);
|
||||
}
|
||||
}
|
|
@ -284,6 +284,11 @@ public class MissionEventDistributor {
|
|||
eventEnumListMap.put(GameEvent.JOIN_FAMILY,typeList);
|
||||
eventProcessor.put(GameEvent.JOIN_FAMILY,new CumulationDataEventProcessor());
|
||||
|
||||
typeList = new ArrayList<>();
|
||||
typeList.add(MissionType.FRIEND_APPLY);
|
||||
eventEnumListMap.put(GameEvent.FRIEND_APPLY,typeList);
|
||||
eventProcessor.put(GameEvent.FRIEND_APPLY,new CumulationDataEventProcessor());
|
||||
|
||||
}
|
||||
|
||||
private static final ThreadLocal<Map<GameMisionType, List<MissionStateChangeInfo>>> threadMissionChangeList =
|
||||
|
|
Loading…
Reference in New Issue