Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
24aa3f8536
|
@ -82,6 +82,8 @@ public interface BIReason {
|
||||||
int ENDLESS_REASON_CHANGE = 50;//无尽副本赛季更换
|
int ENDLESS_REASON_CHANGE = 50;//无尽副本赛季更换
|
||||||
int RANDOM_SOULEQUIP = 51;//占星
|
int RANDOM_SOULEQUIP = 51;//占星
|
||||||
|
|
||||||
|
int DIRECT_BUY = 52; // 直购
|
||||||
|
|
||||||
|
|
||||||
//道具消耗原因 1000开头
|
//道具消耗原因 1000开头
|
||||||
int ADVENTURE_UPLEVEL_CONSUME = 1000; //秘境升级
|
int ADVENTURE_UPLEVEL_CONSUME = 1000; //秘境升级
|
||||||
|
|
|
@ -74,6 +74,10 @@ public class RoomMatchRequestHandler extends BaseHandler{
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
User user = UserManager.getUser(iSession.getUid());
|
User user = UserManager.getUser(iSession.getUid());
|
||||||
|
if( !user.getTeamPosManager().getTeamPosForHero().containsKey(GlobalsDef.BLOODY_TEAM)){
|
||||||
|
MessageUtil.sendErrorResponse(iSession,0,responseMsgId,"未设置编队");
|
||||||
|
return;
|
||||||
|
}
|
||||||
snapUserFightInfo(user);
|
snapUserFightInfo(user);
|
||||||
RedisUtil.getInstence().set(RedisKey.MATCH_UID_KEY + ":" + uid,gson.toJson("1"));
|
RedisUtil.getInstence().set(RedisKey.MATCH_UID_KEY + ":" + uid,gson.toJson("1"));
|
||||||
List<String> matchAddressInfos = RedisUtil.getInstence().getAllSetToList(RedisKey.MATCH_SERVER_INFO + ":" + GameApplication.areaId, String.class);
|
List<String> matchAddressInfos = RedisUtil.getInstence().getAllSetToList(RedisKey.MATCH_SERVER_INFO + ":" + GameApplication.areaId, String.class);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ljsd.jieling.logic.dao;
|
package com.ljsd.jieling.logic.dao;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.config.SItem;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
import com.ljsd.jieling.util.KeyGenUtils;
|
import com.ljsd.jieling.util.KeyGenUtils;
|
||||||
import com.ljsd.jieling.util.UUIDEnum;
|
import com.ljsd.jieling.util.UUIDEnum;
|
||||||
|
@ -12,7 +13,8 @@ public class EspecialEquip extends PropertyItem {
|
||||||
super();
|
super();
|
||||||
super.setId(KeyGenUtils.produceIdByModule(UUIDEnum.ESPECIAL_EQUIP, uid));
|
super.setId(KeyGenUtils.produceIdByModule(UUIDEnum.ESPECIAL_EQUIP, uid));
|
||||||
super.setEquipId(equipTid);
|
super.setEquipId(equipTid);
|
||||||
this.star = 3;
|
SItem item = SItem.getsItemMap().get(equipTid);
|
||||||
|
this.star = item.getQuantity();
|
||||||
}
|
}
|
||||||
public EspecialEquip() {
|
public EspecialEquip() {
|
||||||
this.setRootCollection(User._COLLECTION_NAME);
|
this.setRootCollection(User._COLLECTION_NAME);
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.ljsd.jieling.logic.store;
|
||||||
|
|
||||||
import com.ljsd.jieling.config.*;
|
import com.ljsd.jieling.config.*;
|
||||||
import com.ljsd.jieling.core.VipPrivilegeType;
|
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||||
|
import com.ljsd.jieling.globals.BIReason;
|
||||||
import com.ljsd.jieling.globals.Global;
|
import com.ljsd.jieling.globals.Global;
|
||||||
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;
|
||||||
|
@ -45,7 +46,7 @@ public class BuyGoodsLogic {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TEST_BUY_GIGT_GOODS_RESPONSE_VALUE,null,true);
|
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TEST_BUY_GIGT_GOODS_RESPONSE_VALUE,null,true);
|
||||||
Result result = sendGoods(uid, goodsId, "gm-test", "111111", System.currentTimeMillis(), -1);
|
Result result = sendGoods(uid, goodsId, "gm-test", "111111", System.currentTimeMillis(), -999);
|
||||||
User user = UserManager.getUser(uid);
|
User user = UserManager.getUser(uid);
|
||||||
int price =sRechargeCommodityConfig.getPrice();
|
int price =sRechargeCommodityConfig.getPrice();
|
||||||
int isDiscount = sRechargeCommodityConfig.getIsDiscount();
|
int isDiscount = sRechargeCommodityConfig.getIsDiscount();
|
||||||
|
@ -190,22 +191,35 @@ public class BuyGoodsLogic {
|
||||||
|
|
||||||
buyGoodsTimes.put(goodsId,buyCount);
|
buyGoodsTimes.put(goodsId,buyCount);
|
||||||
rechargeInfo.setBuyGoodsTimes(buyGoodsTimes);
|
rechargeInfo.setBuyGoodsTimes(buyGoodsTimes);
|
||||||
//妖精
|
//直购礼包
|
||||||
String title = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_title");
|
if(type == GiftGoodsType.DIRECTBAG){
|
||||||
String content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt");
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sRechargeCommodityConfig.getBaseReward(), BIReason.DIRECT_BUY);
|
||||||
if(type== 3 || type==1 || type==6){
|
ISession session = OnlineUserManager.getSessionByUid(uid);
|
||||||
content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt",new Object[]{rewardStr.split("#")[1]});
|
if(session!=null){
|
||||||
|
PlayerInfoProto.DirectBuyIndication build = PlayerInfoProto.DirectBuyIndication.newBuilder().setDrop(drop).build();
|
||||||
|
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.DIRECT_BUY_GOODS_INDICATION_VALUE,build,true);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
String title = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_title");
|
||||||
|
String content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt");
|
||||||
|
if(type== 3 || type==1 || type==6){
|
||||||
|
content = SErrorCodeEerverConfig.getI18NMessage("recharge_" + sRechargeCommodityConfig.getType() + "_txt",new Object[]{rewardStr.split("#")[1]});
|
||||||
|
}
|
||||||
|
MailLogic.getInstance().sendMail(user.getId(),title,content,rewardStr,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||||
}
|
}
|
||||||
MailLogic.getInstance().sendMail(user.getId(),title,content,rewardStr,nowTime, Global.MAIL_EFFECTIVE_TIME);
|
|
||||||
resultRes.setResultCode(1);
|
resultRes.setResultCode(1);
|
||||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserPayEvent,goodsId,orderId,resultRes.getResultCode(),price);
|
KtEventUtils.onKtEvent(user, ParamEventBean.UserPayEvent,goodsId,orderId,resultRes.getResultCode(),price);
|
||||||
notifyPaySuccessFul(uid,goodsId);
|
notifyPaySuccessFul(uid,goodsId,amount != -999);
|
||||||
return resultRes;
|
return resultRes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//通知前端充值成功
|
//通知前端充值成功
|
||||||
public static void notifyPaySuccessFul(int uid,int goodsId){
|
public static void notifyPaySuccessFul(int uid,int goodsId,boolean needNotify){
|
||||||
|
if(!needNotify){
|
||||||
|
return;
|
||||||
|
}
|
||||||
ISession session = OnlineUserManager.getSessionByUid(uid);
|
ISession session = OnlineUserManager.getSessionByUid(uid);
|
||||||
if(session!=null){
|
if(session!=null){
|
||||||
PlayerInfoProto.NotifyPaySuccessfulIndicaiton build = PlayerInfoProto.NotifyPaySuccessfulIndicaiton.newBuilder().setGoodsId(goodsId).build();
|
PlayerInfoProto.NotifyPaySuccessfulIndicaiton build = PlayerInfoProto.NotifyPaySuccessfulIndicaiton.newBuilder().setGoodsId(goodsId).build();
|
||||||
|
|
Loading…
Reference in New Issue