修改战斗计算结果
parent
8811db9292
commit
6b38f4f77e
|
@ -9,6 +9,7 @@ public enum FightType {
|
||||||
GuildFight(6), // 公会站
|
GuildFight(6), // 公会站
|
||||||
BloodyFight(7), // 血战
|
BloodyFight(7), // 血战
|
||||||
MonterFight(8), // 兽潮
|
MonterFight(8), // 兽潮
|
||||||
|
TOPFight(9), // 巅峰赛
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
package com.ljsd;
|
||||||
|
|
||||||
|
public class MyBeanListener {
|
||||||
|
}
|
|
@ -54,9 +54,9 @@ public class ChampionshipLogic {
|
||||||
|
|
||||||
private static Map<Integer,GameFightType> gameFightTypeMap = new HashMap<>();
|
private static Map<Integer,GameFightType> gameFightTypeMap = new HashMap<>();
|
||||||
static {
|
static {
|
||||||
gameFightTypeMap.put(0,GameFightType.ArenaPersonFight);
|
gameFightTypeMap.put(0,GameFightType.TOPArenaPersonFight);
|
||||||
gameFightTypeMap.put(1,GameFightType.ArenaRobotFight);
|
gameFightTypeMap.put(1,GameFightType.TOPArenaRobotFight);
|
||||||
gameFightTypeMap.put(2,GameFightType.Arena2RobotFight);
|
gameFightTypeMap.put(2,GameFightType.TOPArena2RobotFight);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void viewFinalInfo(ISession iSession, int type) throws Exception {
|
public static void viewFinalInfo(ISession iSession, int type) throws Exception {
|
||||||
|
|
|
@ -29,7 +29,10 @@ public enum GameFightType {
|
||||||
|
|
||||||
ArenaPersonFight(FightType.ArenaFight,new PVPFightHandler(),null),
|
ArenaPersonFight(FightType.ArenaFight,new PVPFightHandler(),null),
|
||||||
ArenaRobotFight(FightType.ArenaFight,new PVPFightHandler(),null),
|
ArenaRobotFight(FightType.ArenaFight,new PVPFightHandler(),null),
|
||||||
Arena2RobotFight(FightType.ArenaFight,new PVPFightHandler(),null),
|
|
||||||
|
TOPArenaPersonFight(FightType.TOPFight,new PVPFightHandler(),null),
|
||||||
|
TOPArenaRobotFight(FightType.TOPFight,new PVPFightHandler(),null),
|
||||||
|
TOPArena2RobotFight(FightType.TOPFight,new PVPFightHandler(),null),
|
||||||
|
|
||||||
MonterFight(FightType.MonterFight,new DefaultWithoutHandFightHandler(),null),
|
MonterFight(FightType.MonterFight,new DefaultWithoutHandFightHandler(),null),
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class MissionLoigc {
|
||||||
getDailyMission(user,missionList);
|
getDailyMission(user,missionList);
|
||||||
getVipMission(user,missionList);
|
getVipMission(user,missionList);
|
||||||
getCopyMission(user,missionList);
|
getCopyMission(user,missionList);
|
||||||
getTreasureMission(user,missionList,ActivityType.TREASURE);
|
// getTreasureMission(user,missionList,ActivityType.TREASURE);
|
||||||
getTreasureMission(user,missionList,ActivityType.SERVERHAPPY);
|
getTreasureMission(user,missionList,ActivityType.SERVERHAPPY);
|
||||||
getBeginnerMisssion(user,missionList);
|
getBeginnerMisssion(user,missionList);
|
||||||
getBloodyMisison(user,missionList);
|
getBloodyMisison(user,missionList);
|
||||||
|
|
|
@ -426,6 +426,8 @@ public class PlayerLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mailReward = ItemUtil.getMailReward(rewards);
|
mailReward = ItemUtil.getMailReward(rewards);
|
||||||
|
}else if( type == GiftGoodsType.FOUND){
|
||||||
|
mailReward = ItemUtil.getMailReward(SLuxuryFund.getByFoundIdAndDay(goodsInfo.getKey(),days).getreward());
|
||||||
}else{
|
}else{
|
||||||
int theIndexByTarget = MathUtils.getTheIndexByTarget(sRechargeCommodityConfig.getPlayerLevel(), level);
|
int theIndexByTarget = MathUtils.getTheIndexByTarget(sRechargeCommodityConfig.getPlayerLevel(), level);
|
||||||
int[][] extraReward = sRechargeCommodityConfig.getExtraReward()[theIndexByTarget];
|
int[][] extraReward = sRechargeCommodityConfig.getExtraReward()[theIndexByTarget];
|
||||||
|
@ -447,6 +449,11 @@ public class PlayerLogic {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private String getRewardOfDay(int goodsId,int days){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
public CommonProto.TeamOneInfo.Builder getUserTeamOneInfo(int uid,int teamId) throws Exception {
|
public CommonProto.TeamOneInfo.Builder getUserTeamOneInfo(int uid,int teamId) throws Exception {
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
PlayerManager playerManager = user.getPlayerInfoManager();
|
PlayerManager playerManager = user.getPlayerInfoManager();
|
||||||
|
|
|
@ -312,6 +312,15 @@ public class BuyGoodsLogic {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isHadBought( Map<Integer, Integer> buyGoodsTimes,int giftGoodsType){
|
||||||
|
for(SRechargeCommodityConfig sRechargeCommodityConfig : SRechargeCommodityConfig.rechargeCommodityConfigMap.values()){
|
||||||
|
if(sRechargeCommodityConfig.getType() == giftGoodsType && buyGoodsTimes.containsKey(sRechargeCommodityConfig.getId())){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean getGoodsBagInfo(int uid,List<CommonProto.GiftGoodsInfo> giftGoodsInfoList,boolean needClear) throws Exception {
|
public static boolean getGoodsBagInfo(int uid,List<CommonProto.GiftGoodsInfo> giftGoodsInfoList,boolean needClear) throws Exception {
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
RechargeInfo rechargeInfo = user.getPlayerInfoManager().getRechargeInfo();
|
RechargeInfo rechargeInfo = user.getPlayerInfoManager().getRechargeInfo();
|
||||||
|
@ -326,6 +335,7 @@ public class BuyGoodsLogic {
|
||||||
if(needClear){
|
if(needClear){
|
||||||
rechargeInfo.clearCacheSendId();
|
rechargeInfo.clearCacheSendId();
|
||||||
}
|
}
|
||||||
|
boolean ishadbouthtLuxuryMonthCard = isHadBought(buyGoodsTimes,GiftGoodsType.LUXURYMONTHCARD);
|
||||||
for(SRechargeCommodityConfig sRechargeCommodityConfig :SRechargeCommodityConfig.rechargeCommodityConfigMap.values()){
|
for(SRechargeCommodityConfig sRechargeCommodityConfig :SRechargeCommodityConfig.rechargeCommodityConfigMap.values()){
|
||||||
int limit = sRechargeCommodityConfig.getLimit();
|
int limit = sRechargeCommodityConfig.getLimit();
|
||||||
int goodsId = sRechargeCommodityConfig.getId();
|
int goodsId = sRechargeCommodityConfig.getId();
|
||||||
|
@ -345,6 +355,11 @@ public class BuyGoodsLogic {
|
||||||
if(sRechargeCommodityConfig.getType() == 4 && rechargeInfo.getHadBuyFound() !=0){
|
if(sRechargeCommodityConfig.getType() == 4 && rechargeInfo.getHadBuyFound() !=0){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(sRechargeCommodityConfig.getType() == GiftGoodsType.FOUND && !ishadbouthtLuxuryMonthCard){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
int[] discountType = sRechargeCommodityConfig.getDiscountType();
|
int[] discountType = sRechargeCommodityConfig.getDiscountType();
|
||||||
int time = sRechargeCommodityConfig.getTime();
|
int time = sRechargeCommodityConfig.getTime();
|
||||||
long startTime=0;
|
long startTime=0;
|
||||||
|
|
|
@ -8,4 +8,5 @@ public interface GiftGoodsType {
|
||||||
int DIRECTBAG=5; //5直购礼包
|
int DIRECTBAG=5; //5直购礼包
|
||||||
int LUXURYMONTHCARD =6;//6豪华月卡
|
int LUXURYMONTHCARD =6;//6豪华月卡
|
||||||
int WEEKCARD = 7; //周卡
|
int WEEKCARD = 7; //周卡
|
||||||
|
int FOUND = 8; //豪华基金
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
package config;
|
||||||
|
|
||||||
|
import manager.STableManager;
|
||||||
|
import manager.Table;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Table(name ="LuxuryFund")
|
||||||
|
public class SLuxuryFund implements BaseConfig {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int type;
|
||||||
|
|
||||||
|
private int day;
|
||||||
|
|
||||||
|
private int[][] reward;
|
||||||
|
|
||||||
|
private static Map<Integer,SLuxuryFund> sLuxuryFundByFoundAndDay;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init() throws Exception {
|
||||||
|
Map<Integer, SLuxuryFund> config = STableManager.getConfig(SLuxuryFund.class);
|
||||||
|
Map<Integer,SLuxuryFund> sLuxuryFundByFoundAndDayTmp = new HashMap<>();
|
||||||
|
config.values().forEach(sLuxuryFund->{
|
||||||
|
sLuxuryFundByFoundAndDayTmp.put(sLuxuryFund.getType()*100 + sLuxuryFund.getDay(),sLuxuryFund);
|
||||||
|
});
|
||||||
|
sLuxuryFundByFoundAndDay = sLuxuryFundByFoundAndDayTmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static SLuxuryFund getByFoundIdAndDay(int foundId,int day){
|
||||||
|
return sLuxuryFundByFoundAndDay.get(foundId*100+day);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDay() {
|
||||||
|
return day;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getreward() {
|
||||||
|
return reward;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue