宝物品质 宝物精炼 轩辕宝境 礼包推送
parent
23b4cb9eb8
commit
0cf0f239d0
|
@ -22,6 +22,8 @@ import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||||
import com.ljsd.jieling.logic.rank.RankContext;
|
import com.ljsd.jieling.logic.rank.RankContext;
|
||||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||||
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
||||||
|
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
|
||||||
|
import com.ljsd.jieling.logic.store.newRechargeInfo.PushRechargeType;
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
import rpc.protocols.CommonProto;
|
import rpc.protocols.CommonProto;
|
||||||
import rpc.protocols.MapInfoProto;
|
import rpc.protocols.MapInfoProto;
|
||||||
|
@ -290,7 +292,7 @@ public class SituationLogic {
|
||||||
}
|
}
|
||||||
// 埋点报送
|
// 埋点报送
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.START_SKY_REALM.getType(), sRaceTowerConfig.getType(),id,combat_results,dropResult);
|
ReportUtil.onReportEvent(user, ReportEventEnum.START_SKY_REALM.getType(), sRaceTowerConfig.getType(),id,combat_results,dropResult);
|
||||||
|
BuyGoodsNewLogic.openPush(session, user, PushRechargeType.XIANYUAN_BAOJING.getType(), sRaceTowerConfig.getQuality(), 1);
|
||||||
// user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_CHALLENGE,sDailyChallengeConfig.getType());
|
// user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_CHALLENGE,sDailyChallengeConfig.getType());
|
||||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),builder.build());
|
MessageUtil.sendMessage(session,1,messageType.getNumber(),builder.build());
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,8 @@ import com.ljsd.jieling.logic.dao.root.User;
|
||||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||||
import com.ljsd.jieling.logic.hero.HongMengFunctionEnum;
|
import com.ljsd.jieling.logic.hero.HongMengFunctionEnum;
|
||||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||||
|
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
|
||||||
|
import com.ljsd.jieling.logic.store.newRechargeInfo.PushRechargeType;
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
import com.ljsd.jieling.util.CBean2Proto;
|
import com.ljsd.jieling.util.CBean2Proto;
|
||||||
import com.ljsd.jieling.util.ItemMap;
|
import com.ljsd.jieling.util.ItemMap;
|
||||||
|
@ -889,6 +891,8 @@ public class ItemLogic {
|
||||||
jewel.setLevel(jewel.getLevel() + 1);
|
jewel.setLevel(jewel.getLevel() + 1);
|
||||||
} else {//精炼
|
} else {//精炼
|
||||||
jewel.setBuildLevel(jewel.getBuildLevel() + 1);
|
jewel.setBuildLevel(jewel.getBuildLevel() + 1);
|
||||||
|
|
||||||
|
BuyGoodsNewLogic.openPush(iSession, user, PushRechargeType.BAOWU_JINGLIAN.getType(), jewel.getBuildLevel(), 1);
|
||||||
}
|
}
|
||||||
if (HeroLogic.getInstance().isInTeam(user, jewel.getHeroId(), 1)) {
|
if (HeroLogic.getInstance().isInTeam(user, jewel.getHeroId(), 1)) {
|
||||||
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
Poster.getPoster().dispatchEvent(new UserMainTeamForceEvent(user.getId()));
|
||||||
|
|
|
@ -768,9 +768,7 @@ public class BuyGoodsNewLogic {
|
||||||
int popup = 0;
|
int popup = 0;
|
||||||
boolean push = false;
|
boolean push = false;
|
||||||
for(SPackPushConfig con : list){
|
for(SPackPushConfig con : list){
|
||||||
LOGGER.info("判断的id:{}",con.getId());
|
|
||||||
int bagId = judgePushCondition(user,con);
|
int bagId = judgePushCondition(user,con);
|
||||||
LOGGER.info("判断结果为:{}",bagId);
|
|
||||||
//条件成功
|
//条件成功
|
||||||
if(bagId > 0 && info.getNextPushTime() < System.currentTimeMillis()){
|
if(bagId > 0 && info.getNextPushTime() < System.currentTimeMillis()){
|
||||||
popup = bagId;
|
popup = bagId;
|
||||||
|
@ -803,25 +801,21 @@ public class BuyGoodsNewLogic {
|
||||||
if(scope[0] == 1){//主线关卡
|
if(scope[0] == 1){//主线关卡
|
||||||
int mainLevel = user.getMainLevelManager().getFightId();
|
int mainLevel = user.getMainLevelManager().getFightId();
|
||||||
if(mainLevel < scope[1]){
|
if(mainLevel < scope[1]){
|
||||||
LOGGER.info("aaaa");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}else if(scope[0] == 2){//爬塔
|
}else if(scope[0] == 2){//爬塔
|
||||||
int towerLevel = con.getConditionId()[1];
|
int towerLevel = con.getConditionId()[1];
|
||||||
if(towerLevel < scope[1]){
|
if(towerLevel < scope[1]){
|
||||||
LOGGER.info("bbbb");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}else if(scope[0] == 3){//玩家等级
|
}else if(scope[0] == 3){//玩家等级
|
||||||
int level = user.getPlayerInfoManager().getLevel();
|
int level = user.getPlayerInfoManager().getLevel();
|
||||||
if(level < scope[1]){
|
if(level < scope[1]){
|
||||||
LOGGER.info("cccc");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}else if(scope[0] == 7){
|
}else if(scope[0] == 7){
|
||||||
double mxr = user.getPlayerInfoManager().getNewRechargeInfo().getMaxSingleR();
|
double mxr = user.getPlayerInfoManager().getNewRechargeInfo().getMaxSingleR();
|
||||||
if(mxr < scope[1]){
|
if(mxr < scope[1]){
|
||||||
LOGGER.info("dddd");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -834,7 +828,6 @@ public class BuyGoodsNewLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(con.getPersonas()[index] > rr){
|
if(con.getPersonas()[index] > rr){
|
||||||
LOGGER.info("eeee");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return con.getPacks()[index];
|
return con.getPacks()[index];
|
||||||
|
|
|
@ -1,6 +1,27 @@
|
||||||
package com.ljsd.jieling.logic.store.newRechargeInfo;
|
package com.ljsd.jieling.logic.store.newRechargeInfo;
|
||||||
|
|
||||||
public enum PushRechargeType {
|
public enum PushRechargeType {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1 关卡通过 主线关卡
|
||||||
|
* 2 关卡通过 爬塔
|
||||||
|
* 3 用户养成 玩家等级
|
||||||
|
* 4 道具获取 卡牌星级
|
||||||
|
* 5 关卡失败累计
|
||||||
|
* 6 爬塔失败累计
|
||||||
|
* 7 一次性支付过XX元
|
||||||
|
* 8 用户养成 灵兽品质
|
||||||
|
* 9 用户养成 灵兽星级
|
||||||
|
* 10 购买指定礼包
|
||||||
|
*
|
||||||
|
* 11 道具获取 宝物品质
|
||||||
|
* 12 用户养成 宝物进阶
|
||||||
|
* 13 关卡通过 轩辕宝境
|
||||||
|
* 14 关卡通过 4灵试炼
|
||||||
|
* 15 用户养成 宝物神应
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
main_line(1),
|
main_line(1),
|
||||||
tower(2),
|
tower(2),
|
||||||
user_level(3),
|
user_level(3),
|
||||||
|
@ -11,6 +32,12 @@ public enum PushRechargeType {
|
||||||
pokemon_quality(8),
|
pokemon_quality(8),
|
||||||
pokemon_star(9),
|
pokemon_star(9),
|
||||||
point_recharge(10),
|
point_recharge(10),
|
||||||
|
|
||||||
|
BAOWU_PINGZHI(11),
|
||||||
|
BAOWU_JINGLIAN(12),
|
||||||
|
XIANYUAN_BAOJING(13),
|
||||||
|
FORE_SHILIAN(14),
|
||||||
|
BAOWU_SHENYING(15),
|
||||||
;
|
;
|
||||||
|
|
||||||
private int type;
|
private int type;
|
||||||
|
|
|
@ -30,6 +30,7 @@ import com.ljsd.jieling.logic.mail.MailLogic;
|
||||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||||
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
|
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
|
||||||
|
import com.ljsd.jieling.logic.store.newRechargeInfo.PushRechargeType;
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
import rpc.protocols.CommonProto;
|
import rpc.protocols.CommonProto;
|
||||||
import rpc.protocols.MessageTypeProto;
|
import rpc.protocols.MessageTypeProto;
|
||||||
|
@ -1207,6 +1208,11 @@ public class ItemUtil {
|
||||||
equipManager.addEquip(user,equip);
|
equipManager.addEquip(user,equip);
|
||||||
jewelList.add(CBean2Proto.getEquipProto(equip));
|
jewelList.add(CBean2Proto.getEquipProto(equip));
|
||||||
msgTem="lamp_lottery_equip_content";
|
msgTem="lamp_lottery_equip_content";
|
||||||
|
|
||||||
|
ISession sessionByUid = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
|
if (sessionByUid != null) {
|
||||||
|
BuyGoodsNewLogic.openPush(sessionByUid, user, PushRechargeType.BAOWU_PINGZHI.getType(), item.getQuantity(), 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (item.getQuantity() >= SSpecialConfig.getIntegerValue(msgTem+"_parm")) {
|
if (item.getQuantity() >= SSpecialConfig.getIntegerValue(msgTem+"_parm")) {
|
||||||
String nickName = user.getPlayerInfoManager().getNickName();
|
String nickName = user.getPlayerInfoManager().getNickName();
|
||||||
|
|
|
@ -14,6 +14,8 @@ public class SRaceTowerConfig implements BaseConfig {
|
||||||
|
|
||||||
private int openRules;
|
private int openRules;
|
||||||
|
|
||||||
|
private int quality;
|
||||||
|
|
||||||
private int[] reward;
|
private int[] reward;
|
||||||
|
|
||||||
private int[] firstReward;
|
private int[] firstReward;
|
||||||
|
@ -74,4 +76,8 @@ public class SRaceTowerConfig implements BaseConfig {
|
||||||
public int getFormation() {
|
public int getFormation() {
|
||||||
return formation;
|
return formation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getQuality() {
|
||||||
|
return quality;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue