log
parent
3e453d600c
commit
d79d7bf28c
|
|
@ -29,6 +29,7 @@ import com.ljsd.jieling.network.session.ISession;
|
|||
import com.ljsd.jieling.protocols.ArenaInfoProto;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.thread.ThreadManager;
|
||||
import com.ljsd.jieling.util.*;
|
||||
import config.*;
|
||||
;
|
||||
|
|
@ -87,8 +88,6 @@ public class ChampionshipLogic {
|
|||
for (ArenaRecord arenaRecord : arenaRecords) {
|
||||
int attackId = arenaRecord.getAttackId();
|
||||
int defUid = arenaRecord.getDefUid();
|
||||
String attackName = getRoleNameById(attackId, config);
|
||||
String defName = getRoleNameById(defUid, config);
|
||||
int fightResult = arenaRecord.getFightResult();
|
||||
if (arenaRecord.getRoundTims() == roundTimes && progress % 10 % 4 != 3) {
|
||||
fightResult = -1;
|
||||
|
|
@ -374,7 +373,10 @@ public class ChampionshipLogic {
|
|||
for(Integer sendId : sendIds.keySet()){
|
||||
User user = UserManager.getUser(sendId);
|
||||
Item item = user.getItemManager().getItem(arenaItemId);
|
||||
int itemNum = item.getItemNum();
|
||||
int itemNum=0;
|
||||
if(item!=null){
|
||||
itemNum = item.getItemNum();
|
||||
}
|
||||
if(item!=null && itemNum>0){
|
||||
int[][] costs = new int[1][];
|
||||
costs[0] = new int[2];
|
||||
|
|
@ -385,6 +387,7 @@ public class ChampionshipLogic {
|
|||
itemReward.put(rewardItemId,itemNum/sChampionshipSetting.getExchangeItem());
|
||||
ItemUtil.addItem(user,itemReward,null,BIReason.CHAMPIONM_EXCHANGE_REWARD);
|
||||
}
|
||||
LOGGER.info("the uid={},send rewardnum={}",itemNum/sChampionshipSetting.getExchangeItem());
|
||||
|
||||
}
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
|
|
@ -1371,14 +1374,38 @@ public class ChampionshipLogic {
|
|||
}
|
||||
|
||||
if(progress%10%4==0){
|
||||
selectToBattle();
|
||||
ThreadManager.getScheduledExecutor().execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
selectToBattle();
|
||||
}
|
||||
});
|
||||
}
|
||||
if(progress%10%4==1){ //竞猜阶段 后台自动运行战斗
|
||||
switchBet(timeControllerOfFunction.getId());
|
||||
ThreadManager.getScheduledExecutor().execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
switchBet(timeControllerOfFunction.getId());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}else if(progress%10%4==3){ //结算阶段
|
||||
//等待玩家数据分数入redis
|
||||
scoreToRedis();
|
||||
sendBetReward();
|
||||
ThreadManager.getScheduledExecutor().execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
scoreToRedis();
|
||||
sendBetReward();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
sendAllProgressUpdate();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ public class PlayerLogic {
|
|||
}
|
||||
}
|
||||
mailReward = ItemUtil.getMailReward(rewards);
|
||||
}else if( type == GiftGoodsType.FOUND){
|
||||
}else if( type == GiftGoodsType.FOUND_ONE || type == GiftGoodsType.FOUND_TWO){
|
||||
mailReward = ItemUtil.getMailReward(SLuxuryFund.getByFoundIdAndDay(goodsInfo.getKey(),days).getreward());
|
||||
}else{
|
||||
int theIndexByTarget = MathUtils.getTheIndexByTarget(sRechargeCommodityConfig.getPlayerLevel(), level);
|
||||
|
|
|
|||
|
|
@ -109,12 +109,12 @@ public class BuyGoodsLogic {
|
|||
}
|
||||
|
||||
int nowTime =(int) (TimeUtils.now()/1000);
|
||||
if(type == GiftGoodsType.MONTHCARD || type == GiftGoodsType.LUXURYMONTHCARD || type == GiftGoodsType.WEEKCARD){
|
||||
if(sRechargeCommodityConfig.getContiueDays()>0){
|
||||
Integer endTime = null;
|
||||
Map<Integer, Integer> goodsDurationMap = rechargeInfo.getGoodsDurationMap();
|
||||
boolean needSendMail = false;
|
||||
for(Map.Entry<Integer,Integer> goodsDurationItem : goodsDurationMap.entrySet()){
|
||||
if(SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsDurationItem.getKey()).getType() == type){
|
||||
if(sRechargeCommodityConfig.getType() == type){
|
||||
endTime = goodsDurationItem.getValue();
|
||||
}
|
||||
}
|
||||
|
|
@ -335,7 +335,7 @@ public class BuyGoodsLogic {
|
|||
if(needClear){
|
||||
rechargeInfo.clearCacheSendId();
|
||||
}
|
||||
boolean ishadbouthtLuxuryMonthCard = isHadBought(buyGoodsTimes,GiftGoodsType.LUXURYMONTHCARD);
|
||||
|
||||
for(SRechargeCommodityConfig sRechargeCommodityConfig :SRechargeCommodityConfig.rechargeCommodityConfigMap.values()){
|
||||
int limit = sRechargeCommodityConfig.getLimit();
|
||||
int goodsId = sRechargeCommodityConfig.getId();
|
||||
|
|
@ -356,9 +356,7 @@ public class BuyGoodsLogic {
|
|||
continue;
|
||||
}
|
||||
|
||||
if(sRechargeCommodityConfig.getType() == GiftGoodsType.FOUND && !ishadbouthtLuxuryMonthCard){
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
int[] discountType = sRechargeCommodityConfig.getDiscountType();
|
||||
int time = sRechargeCommodityConfig.getTime();
|
||||
|
|
|
|||
|
|
@ -8,5 +8,6 @@ public interface GiftGoodsType {
|
|||
int DIRECTBAG=5; //5直购礼包
|
||||
int LUXURYMONTHCARD =6;//6豪华月卡
|
||||
int WEEKCARD = 7; //周卡
|
||||
int FOUND = 8; //豪华基金
|
||||
int FOUND_ONE = 8; //豪华基金
|
||||
int FOUND_TWO = 9; //豪华基金
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class MinuteTask extends Thread {
|
|||
ActivityLogic.getInstance().checkSecretBoxSeason();
|
||||
StoreLogic.checkGlobalStore(false);
|
||||
MapLogic.getInstance().minuteCheckAndRemoveMapRank();
|
||||
GlobalDataManaager.getInstance().checkSystemFunctioIsOpen();
|
||||
|
||||
everyZeroTask();
|
||||
everyFiveTask();
|
||||
everyMondyFiveClockTask();
|
||||
|
|
@ -69,7 +69,7 @@ public class MinuteTask extends Thread {
|
|||
CoreLogic.getInstance().checkCoreCdk();
|
||||
BuyGoodsLogic.minuteCheckReharge();
|
||||
RedisUtil.getInstence().set(RedisKey.ONLINE_NUM+RedisKey.Delimiter_colon+GameApplication.serverId, String.valueOf(OnlineUserManager.sessionMap.entrySet().size()));
|
||||
ChampionshipLogic.minuteCheck(false);
|
||||
|
||||
LOGGER.info("MinuteTask end...");
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("e",e);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.ljsd.jieling.thread.task;
|
||||
|
||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.championship.ChampionshipLogic;
|
||||
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -14,9 +16,9 @@ public class SecondsTask extends Thread {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
GuilidManager.checkNeedReleaseGuild();
|
||||
|
||||
GlobalDataManaager.getInstance().checkSystemFunctioIsOpen();
|
||||
ChampionshipLogic.minuteCheck(false);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("e",e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
package PACKAGE_NAME;
|
||||
|
||||
public class Test {
|
||||
}
|
||||
Loading…
Reference in New Issue