自动返利
parent
b5323a534e
commit
8c10cde626
|
@ -77,6 +77,10 @@ public class GmActivityLogic implements IEventHandler {
|
|||
User user = UserManager.getUser(rechargeBackEvent.getUserId());
|
||||
GmActivityManager manager = user.getGmActivityManager();
|
||||
HashMap<String, GmActivity> activityMap = manager.getActivityMap();
|
||||
// 邮件信息
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("zidongfanli_mail_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("zidongfanli_mail_text");
|
||||
|
||||
for (Map.Entry<String, GmActivity> entry : activityMap.entrySet()) {
|
||||
GmActivity gmActivity = entry.getValue();
|
||||
// 时间校验
|
||||
|
@ -86,9 +90,6 @@ public class GmActivityLogic implements IEventHandler {
|
|||
if (start > now || end <= now){
|
||||
continue;
|
||||
}
|
||||
// 邮件信息
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("zidongfanli_mail_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("zidongfanli_mail_text");
|
||||
List<int[][]> rewards = new ArrayList<>();
|
||||
switch (gmActivity.getType()){
|
||||
case 1:
|
||||
|
@ -199,9 +200,10 @@ public class GmActivityLogic implements IEventHandler {
|
|||
// 当前档位还可以返利得金额
|
||||
int count = arbMission.getAfterNum() - gmMission.getValue();
|
||||
// 总返利和当前档位返利获取最小
|
||||
int min = Math.min(num, count);
|
||||
// 奖励
|
||||
int[][] reward = {{16,min*arbMission.getBackRatio()}};
|
||||
double min = Math.min(num, count);
|
||||
int rewardNum = (int) (arbMission.getBackRatio()/100d*1000*min);
|
||||
// 返利妖晶
|
||||
int[][] reward = {{16,rewardNum}};
|
||||
rewards.add(reward);
|
||||
// 档位信息更新
|
||||
gmMission.setId(arbMission.getId());
|
||||
|
@ -211,6 +213,7 @@ public class GmActivityLogic implements IEventHandler {
|
|||
}else {
|
||||
gmMission.setValue(gmMission.getValue() + num);
|
||||
}
|
||||
gmActivity.setValue(num);
|
||||
gmActivity.putMissionMap(arbMission.getId(),gmMission);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -606,7 +606,6 @@ public class PlayerManager extends MongoBase {
|
|||
long maxTime;
|
||||
VipInfo newVipInfo = new VipInfo();
|
||||
if(config.getContinueTime()!=null && config.getContinueTime().length>0){
|
||||
|
||||
if(vipInfo.containsKey(privilegeId)){
|
||||
VipInfo info = vipInfo.get(privilegeId);
|
||||
if(config.getContinueTime()[1]==1 && TimeUtils.nowInt()< info.getEffectTime()){
|
||||
|
|
|
@ -521,12 +521,10 @@ public class ExpeditionLogic {
|
|||
|
||||
public static void openTreasure(User user,int type,int parm){
|
||||
SExpeditionSetting sExpeditionSetting = STableManager.getConfig(SExpeditionSetting.class).get(1);
|
||||
int openRule = sExpeditionSetting.getOpenRules()[0];
|
||||
if(openRule == type && sExpeditionSetting.getOpenRules()[1] == parm){
|
||||
int[] openRule = sExpeditionSetting.getOpenRules();
|
||||
if(openRule[0] == type && openRule[1] == parm){
|
||||
//国服设置第十四天后开启
|
||||
user.getExpeditionManager().getWorldTreasureReward().setFirstStartTime((int)((TimeUtils.now()+14*TimeUtils.ONE_DAY)/1000));
|
||||
// user.getExpeditionManager().resetTreasureReward(1);
|
||||
// sendAllTreasureInfo(user);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -823,7 +821,7 @@ public class ExpeditionLogic {
|
|||
WorldTreasureReward worldTreasureReward = user.getExpeditionManager().getWorldTreasureReward();
|
||||
|
||||
Expedition.ExpeditionTreasureInfoResponse.Builder response = Expedition.ExpeditionTreasureInfoResponse.newBuilder();
|
||||
if(worldTreasureReward.getFirstStartTime()!=0&&worldTreasureReward.getFirstStartTime()<=TimeUtils.nowInt()&&worldTreasureReward.getCreateTime()>TimeUtils.now()/1000){
|
||||
if(worldTreasureReward.getFirstStartTime()!=0&&worldTreasureReward.getFirstStartTime()<=TimeUtils.nowInt()&&worldTreasureReward.getCreateTime()>TimeUtils.nowInt()){
|
||||
Map<Integer, Integer> rewardStatusMap = worldTreasureReward.getRewardStatusMap();
|
||||
WorldBossTreasureStaticConfig worldBossTreasureStaticConfig = STableManager.getFigureConfig(WorldBossTreasureStaticConfig.class);
|
||||
Set<SWorldBossTreasureConfig> sWorldBossTreasureConfigs = worldBossTreasureStaticConfig.getIdsByPeriods().get(worldTreasureReward.getRound());
|
||||
|
|
|
@ -312,7 +312,7 @@ public class STableManager {
|
|||
field.setAccessible(flag);
|
||||
map.put(id, obj);
|
||||
} catch (NoSuchFieldException e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.error("读表报错,表name:{},异常:{}",clazz.getSimpleName(),e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue