Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
cfe7d058f8
|
@ -41,7 +41,7 @@ public class ActivityLogic {
|
||||||
public void flushEveryDay(User user, PlayerInfoProto.FivePlayerUpdateIndication.Builder fBuilder) throws Exception {
|
public void flushEveryDay(User user, PlayerInfoProto.FivePlayerUpdateIndication.Builder fBuilder) throws Exception {
|
||||||
|
|
||||||
//跟新签到天数
|
//跟新签到天数
|
||||||
if (!TimeUtils.isSameMonthWithNow(user.getPlayerInfoManager().getOffLineTime())) {
|
if (!TimeUtils.isSameMonthFiveWithNow(user.getPlayerInfoManager().getOffLineTime())) {
|
||||||
user.getPlayerInfoManager().setSign(0);
|
user.getPlayerInfoManager().setSign(0);
|
||||||
user.getPlayerInfoManager().setSignTotay(0);
|
user.getPlayerInfoManager().setSignTotay(0);
|
||||||
} else if (user.getPlayerInfoManager().getSignTotay() == 1) {
|
} else if (user.getPlayerInfoManager().getSignTotay() == 1) {
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.ljsd.jieling.logic.fight;
|
||||||
import com.ljsd.jieling.config.*;
|
import com.ljsd.jieling.config.*;
|
||||||
import com.ljsd.jieling.core.GlobalsDef;
|
import com.ljsd.jieling.core.GlobalsDef;
|
||||||
import com.ljsd.jieling.core.VipPrivilegeType;
|
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||||
|
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||||
import com.ljsd.jieling.db.redis.RedisKey;
|
import com.ljsd.jieling.db.redis.RedisKey;
|
||||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
import com.ljsd.jieling.globals.BIReason;
|
import com.ljsd.jieling.globals.BIReason;
|
||||||
|
@ -870,6 +871,7 @@ public class CombatLogic {
|
||||||
}
|
}
|
||||||
String content=SErrorCodeEerverConfig.getI18NMessage("adventure_boss_reward_txt",new Object[]{user.getPlayerInfoManager().getNickName(),rank});
|
String content=SErrorCodeEerverConfig.getI18NMessage("adventure_boss_reward_txt",new Object[]{user.getPlayerInfoManager().getNickName(),rank});
|
||||||
MailLogic.getInstance().sendMail(user.getId(),title,content,rewardByRank,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
MailLogic.getInstance().sendMail(user.getId(),title,content,rewardByRank,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||||
|
MongoUtil.getInstence().lastUpdate();
|
||||||
}
|
}
|
||||||
String key = RedisUtil.getInstence().getKey(RedisKey.ADVENTRUEN_BOSS_RANK, "");
|
String key = RedisUtil.getInstence().getKey(RedisKey.ADVENTRUEN_BOSS_RANK, "");
|
||||||
RedisUtil.getInstence().del(key);
|
RedisUtil.getInstence().del(key);
|
||||||
|
|
|
@ -911,6 +911,7 @@ public class HeroLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<Integer,Integer> calHeroNotBufferAttribute(User user, Hero hero,boolean isForce){
|
public Map<Integer,Integer> calHeroNotBufferAttribute(User user, Hero hero,boolean isForce){
|
||||||
|
LOGGER.info("cal herotid = {}",hero.getTemplateId());
|
||||||
Map<Integer, Integer> heroAllAttribute = calHeroAllAttribute(hero,isForce);
|
Map<Integer, Integer> heroAllAttribute = calHeroAllAttribute(hero,isForce);
|
||||||
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE));
|
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE));
|
||||||
Collection<String> values = hero.getEquipByPositionMap().values();
|
Collection<String> values = hero.getEquipByPositionMap().values();
|
||||||
|
@ -941,10 +942,12 @@ public class HeroLogic {
|
||||||
Equip equip = equipManager.getEquipMap().get(equipId);
|
Equip equip = equipManager.getEquipMap().get(equipId);
|
||||||
Map<Integer, Integer> propertyValueByIdMap = equip.getPropertyValueByIdMap();
|
Map<Integer, Integer> propertyValueByIdMap = equip.getPropertyValueByIdMap();
|
||||||
Map<Integer, Integer> secondValueByIdMap = equip.getSecondValueByIdMap();
|
Map<Integer, Integer> secondValueByIdMap = equip.getSecondValueByIdMap();
|
||||||
|
LOGGER.info("cal equip = {}",equip.getEquipId());
|
||||||
combinedAttribute(propertyValueByIdMap,heroAllAttribute);
|
combinedAttribute(propertyValueByIdMap,heroAllAttribute);
|
||||||
combinedAttribute(secondValueByIdMap,heroAllAttribute);
|
combinedAttribute(secondValueByIdMap,heroAllAttribute);
|
||||||
SEquipConfig sEquipConfig = SEquipConfig.getsEquipConfigById(equip.getEquipId());
|
SEquipConfig sEquipConfig = SEquipConfig.getsEquipConfigById(equip.getEquipId());
|
||||||
equipForce+=sEquipConfig.getScore();
|
equipForce+=sEquipConfig.getScore();
|
||||||
|
LOGGER.info("cal equip = {} end",equip.getEquipId());
|
||||||
}
|
}
|
||||||
//天赋异妖加成
|
//天赋异妖加成
|
||||||
Map<Integer, Pokemon> ringFireMap = pokemonManager.getRingFireMap();
|
Map<Integer, Pokemon> ringFireMap = pokemonManager.getRingFireMap();
|
||||||
|
@ -1004,6 +1007,7 @@ public class HeroLogic {
|
||||||
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE));
|
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE));
|
||||||
//装备战力保存
|
//装备战力保存
|
||||||
heroAllAttribute.put(HeroAttributeEnum.EquipForce.getPropertyId(),equipForce);
|
heroAllAttribute.put(HeroAttributeEnum.EquipForce.getPropertyId(),equipForce);
|
||||||
|
LOGGER.info("cal herotid = {},end",hero.getTemplateId());
|
||||||
return heroAllAttribute;
|
return heroAllAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1114,7 +1118,7 @@ public class HeroLogic {
|
||||||
float score = sPropertyConfig.getScore();
|
float score = sPropertyConfig.getScore();
|
||||||
|
|
||||||
result += propertyValue*score;
|
result += propertyValue*score;
|
||||||
LOGGER.info("the value is ={},propertyValue={},score={},result ={},the value={}",propertyValue*score,propertyValue,score,result,propertyValue*score);
|
LOGGER.info("the propertyId={} the value is ={},propertyValue={},score={},result ={},the value={}",propertyId,propertyValue*score,propertyValue,score,result,propertyValue*score);
|
||||||
}
|
}
|
||||||
return (int)result;
|
return (int)result;
|
||||||
}
|
}
|
||||||
|
@ -1127,6 +1131,7 @@ public class HeroLogic {
|
||||||
propertyValue += heroAttributeMap.get(propertyId);
|
propertyValue += heroAttributeMap.get(propertyId);
|
||||||
}
|
}
|
||||||
heroAttributeMap.put(propertyId,propertyValue);
|
heroAttributeMap.put(propertyId,propertyValue);
|
||||||
|
LOGGER.info("the propertyId={} the propertyValue is ={},",propertyId,propertyValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void combinedAttribute(int[][] otherAttriMap,Map<Integer,Integer> heroAttributeMap){
|
public void combinedAttribute(int[][] otherAttriMap,Map<Integer,Integer> heroAttributeMap){
|
||||||
|
|
|
@ -77,16 +77,19 @@ public class MissionLoigc {
|
||||||
int progrss = sTreasureTaskConfig.getTaskValue()[1][0];
|
int progrss = sTreasureTaskConfig.getTaskValue()[1][0];
|
||||||
if(doingMissionIds.contains(missionId)){
|
if(doingMissionIds.contains(missionId)){
|
||||||
state = 0;
|
state = 0;
|
||||||
if(progrss<0){
|
|
||||||
progrss=0;
|
|
||||||
}
|
|
||||||
progrss = getDoingProgress(user,dailyCumulationData,sTreasureTaskConfig.getTaskType(),sTreasureTaskConfig.getTaskValue()[0]);
|
progrss = getDoingProgress(user,dailyCumulationData,sTreasureTaskConfig.getTaskType(),sTreasureTaskConfig.getTaskValue()[0]);
|
||||||
|
if(progrss<0){
|
||||||
|
progrss=0;
|
||||||
|
}
|
||||||
}else if(finishMissionIds.contains(missionId)){
|
}else if(finishMissionIds.contains(missionId)){
|
||||||
state = 1;
|
state = 1;
|
||||||
if(progrss<0){
|
if(progrss<0){
|
||||||
progrss=1;
|
progrss=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(progrss<0){
|
||||||
|
progrss=1;
|
||||||
|
}
|
||||||
if(state!=2 && sTreasureTaskConfig.getTaskType() == MissionType.SENVER_HAPPY.getMissionTypeValue()){
|
if(state!=2 && sTreasureTaskConfig.getTaskType() == MissionType.SENVER_HAPPY.getMissionTypeValue()){
|
||||||
if(progrss>0 && System.currentTimeMillis()>user.getActivityManager().getSenvenTime()){
|
if(progrss>0 && System.currentTimeMillis()>user.getActivityManager().getSenvenTime()){
|
||||||
state=1;
|
state=1;
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
package com.ljsd.jieling.logic.store;
|
package com.ljsd.jieling.logic.store;
|
||||||
|
|
||||||
import com.ljsd.jieling.config.SGameSetting;
|
import com.ljsd.jieling.config.*;
|
||||||
import com.ljsd.jieling.config.SPlayerLevelConfig;
|
|
||||||
import com.ljsd.jieling.config.SStoreConfig;
|
|
||||||
import com.ljsd.jieling.config.SStoreTypeConfig;
|
|
||||||
import com.ljsd.jieling.globals.BIReason;
|
import com.ljsd.jieling.globals.BIReason;
|
||||||
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
import com.ljsd.jieling.ktbeans.KtEventUtils;
|
||||||
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
import com.ljsd.jieling.ktbeans.parmsBean.ParamEventBean;
|
||||||
|
@ -282,8 +279,11 @@ public class StoreLogic {
|
||||||
SPlayerLevelConfig sPlayerLevelConfig = SPlayerLevelConfig.sPlayerLevelConfigMap.get(user.getPlayerInfoManager().getLevel());
|
SPlayerLevelConfig sPlayerLevelConfig = SPlayerLevelConfig.sPlayerLevelConfigMap.get(user.getPlayerInfoManager().getLevel());
|
||||||
add += sPlayerLevelConfig.getExtraAdd();
|
add += sPlayerLevelConfig.getExtraAdd();
|
||||||
}else if(type == 2){
|
}else if(type == 2){
|
||||||
int addPrivageId = extra[0];
|
int addPrivageId = extra[1];
|
||||||
add += user.getPlayerInfoManager().getVipPrivilageValue(addPrivageId);
|
int vipLevel = user.getPlayerInfoManager().getVipLevel();
|
||||||
|
SVipLevelConfig sVipLevelConfig = SVipLevelConfig.getsVipLevelConfigMap().get(vipLevel);
|
||||||
|
Map<Integer, Integer> privilegeMap = sVipLevelConfig.getPrivilegeMap();
|
||||||
|
add +=privilegeMap.get(addPrivageId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,7 +291,7 @@ public class StoreLogic {
|
||||||
for(int i=0;i<length;i++){
|
for(int i=0;i<length;i++){
|
||||||
dropItems[i] = new int[2];
|
dropItems[i] = new int[2];
|
||||||
dropItems[i][0]= goods[i][0];
|
dropItems[i][0]= goods[i][0];
|
||||||
dropItems[i][1]= (int)(goods[i][1]*itemNum * (add /10000f));
|
dropItems[i][1]= (int)(goods[i][1]*itemNum /10000f * add );
|
||||||
}
|
}
|
||||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, dropItems, BIReason.STORE_BUY_ITEM);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, dropItems, BIReason.STORE_BUY_ITEM);
|
||||||
if(SStoreTypeConfig.getsStoreTypeConfigMap().get(storeId).getStoreType() != StoreType.GIFT_STORE.getType()){
|
if(SStoreTypeConfig.getsStoreTypeConfigMap().get(storeId).getStoreType() != StoreType.GIFT_STORE.getType()){
|
||||||
|
|
|
@ -828,6 +828,23 @@ public class TimeUtils {
|
||||||
return (y1 == y2) && (m1 == m2);
|
return (y1 == y2) && (m1 == m2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 是否5点月刷新
|
||||||
|
public static boolean isSameMonthFiveWithNow(long r1) {
|
||||||
|
Calendar c1 = Calendar.getInstance();
|
||||||
|
c1.setTimeInMillis(r1-5*ONE_HOUR);
|
||||||
|
int y1 = c1.get(Calendar.YEAR);
|
||||||
|
int m1 = c1.get(Calendar.MONTH) + 1;
|
||||||
|
|
||||||
|
Calendar c2 = Calendar.getInstance();
|
||||||
|
c2.setTimeInMillis(now()-5*ONE_HOUR);
|
||||||
|
int y2 = c2.get(Calendar.YEAR);
|
||||||
|
int m2 = c2.get(Calendar.MONTH) + 1;
|
||||||
|
// int d2 = c2.get(Calendar.DAY_OF_MONTH);
|
||||||
|
|
||||||
|
return (y1 == y2) && (m1 == m2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得当天指定时间
|
* 获得当天指定时间
|
||||||
|
|
Loading…
Reference in New Issue