new task
parent
f90bbee15a
commit
9cb5277436
|
|
@ -94,6 +94,8 @@ public class CumulationData {
|
|||
public int wearEquipTimes;// 妖灵师穿戴装备件数达到
|
||||
public Map<Integer,Integer> synthesisHeroStarTimesMap = new HashMap<>();// 碎片合成%s星妖灵师次数达到
|
||||
|
||||
public int consumerStamina; //消耗体力数量达到
|
||||
|
||||
|
||||
|
||||
//任务重置
|
||||
|
|
@ -131,6 +133,7 @@ public class CumulationData {
|
|||
synthesisHeroStarTimesMap.clear();
|
||||
clearArray(sEquipQualityCount);
|
||||
clearArray(heroQualityCount);
|
||||
consumerStamina=0;
|
||||
}
|
||||
|
||||
private void clearArray(int[] source){
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ public class GuildLogic {
|
|||
sendPositionChange(targetUid,position);
|
||||
if(position == GlobalsDef.CHAIRMAN){
|
||||
guildInfo.removeMember(GlobalsDef.CHAIRMAN,uid);
|
||||
guildInfo.addMembers(GlobalsDef.MEMBER,targetUid);
|
||||
guildInfo.addMembers(GlobalsDef.MEMBER,uid);
|
||||
sendPositionChange(uid,GlobalsDef.MEMBER);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -496,6 +496,8 @@ public class MissionLoigc {
|
|||
if(missionProgress!=null){
|
||||
count = missionProgress;
|
||||
}
|
||||
case USER_CONSUMER_STAMINA:
|
||||
count= cumulationData.consumerStamina;
|
||||
break;
|
||||
default:
|
||||
count = 0;
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public enum MissionType {
|
|||
TAKE_DAILY_BOX_TIMES(45),//领取日常任务宝箱奖励次数达到
|
||||
HERO_WEAR_EQUIP_TIMES(46),//妖灵师穿戴装备件数达到
|
||||
SYNTHESIS_HERO_STAR_TIMES(47),//碎片合成%s星妖灵师次数达到
|
||||
USER_CONSUMER_STAMINA(48),//消耗体力数量达到
|
||||
;
|
||||
|
||||
private int missionType;
|
||||
|
|
@ -168,6 +169,8 @@ public enum MissionType {
|
|||
return HERO_WEAR_EQUIP_TIMES;
|
||||
case 47:
|
||||
return SYNTHESIS_HERO_STAR_TIMES;
|
||||
case 48:
|
||||
return USER_CONSUMER_STAMINA;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,14 +12,22 @@ public class ConsumerMaterialDataManager implements BaseDataManager{
|
|||
public CumulationData.Result updateData(CumulationData data, MissionType missionType, Object... parm) {
|
||||
CumulationData.Result result = null;
|
||||
Map<Integer, Integer> consumeMaterialMapTmp = (Map<Integer, Integer>) parm[0];
|
||||
Integer count =null;
|
||||
if(missionType == MissionType.USER_CONSUMER_GEM){
|
||||
Integer count = consumeMaterialMapTmp.get(Global.GEM);
|
||||
count = consumeMaterialMapTmp.get(Global.GEM);
|
||||
if(count!=null){
|
||||
data.setConsumeGem(data.getConsumeGem() + count);
|
||||
result = new CumulationData.Result(missionType);
|
||||
}
|
||||
}else if(missionType == MissionType.USER_CONSUMER_STAMINA){
|
||||
count = consumeMaterialMapTmp.get(Global.STAMINA);
|
||||
if(count!=null){
|
||||
data.consumerStamina+=count;
|
||||
result = new CumulationData.Result(missionType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue