Merge branch 'master_test_gn' of http://60.1.1.230/backend/jieling_server into master_test_gn
commit
62e5fac672
|
|
@ -1,10 +1,8 @@
|
|||
package com.ljsd.jieling.handler.hero;
|
||||
|
||||
import com.google.protobuf.GeneratedMessage;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.dao.Hero;
|
||||
import com.ljsd.jieling.logic.dao.PurpleMansionSeal;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
|
@ -18,7 +16,6 @@ import rpc.protocols.MessageTypeProto;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author hj
|
||||
|
|
@ -73,6 +70,7 @@ public class ReplacePurpleMansionSealHandler extends BaseHandler<HeroInfoProto.R
|
|||
PurpleMansionSeal oldSeal = sealMap.get(oneSeal);
|
||||
if (oldSeal != null){
|
||||
oldSeal.setState(0);
|
||||
user.getHeroManager().putPurpleMansionSeal(oldSeal);
|
||||
}
|
||||
// 新神印状态修改
|
||||
seal.setState(1);
|
||||
|
|
@ -99,6 +97,8 @@ public class ReplacePurpleMansionSealHandler extends BaseHandler<HeroInfoProto.R
|
|||
seal.setSubId(heroId);
|
||||
}
|
||||
|
||||
user.getHeroManager().putPurpleMansionSeal(seal);
|
||||
|
||||
// 返回最新神印列表
|
||||
List<CommonProto.PurpleMansionSeal> sealInfo = CBean2Proto.getPurpleMansionSealInfo(user);
|
||||
HeroInfoProto.ReplacePrupleMansionSealResponse build = HeroInfoProto.ReplacePrupleMansionSealResponse.newBuilder().addAllSealList(sealInfo).build();
|
||||
|
|
|
|||
|
|
@ -7,10 +7,7 @@ package com.ljsd.jieling.logic.dao;
|
|||
* @Param $
|
||||
* @return $
|
||||
**/
|
||||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
|
||||
public class PurpleMansionSeal extends MongoBase {
|
||||
public class PurpleMansionSeal{
|
||||
|
||||
/**
|
||||
* 印章id
|
||||
|
|
@ -44,7 +41,6 @@ public class PurpleMansionSeal extends MongoBase {
|
|||
|
||||
public void setSealId(int sealId) {
|
||||
this.sealId = sealId;
|
||||
updateString("sealId", sealId);
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
|
|
@ -53,7 +49,6 @@ public class PurpleMansionSeal extends MongoBase {
|
|||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
updateString("type", type);
|
||||
}
|
||||
|
||||
public String getSubId() {
|
||||
|
|
@ -62,7 +57,6 @@ public class PurpleMansionSeal extends MongoBase {
|
|||
|
||||
public void setSubId(String subId) {
|
||||
this.subId = subId;
|
||||
updateString("subId", subId);
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
|
|
@ -71,6 +65,5 @@ public class PurpleMansionSeal extends MongoBase {
|
|||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
updateString("state", state);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -828,10 +828,16 @@ public class CBean2Proto {
|
|||
values.forEach(v->{
|
||||
// 使用中的神印
|
||||
if (v.getState() == 1){
|
||||
int heroTid = 0;
|
||||
if (v.getType() == 1){
|
||||
Hero hero = user.getHeroManager().getHero(v.getSubId());
|
||||
heroTid = hero.getTemplateId();
|
||||
}
|
||||
|
||||
CommonProto.PurpleSealShowInfo builder = CommonProto.PurpleSealShowInfo.newBuilder()
|
||||
.setId(v.getSealId())
|
||||
.setType(v.getType())
|
||||
.setHeroTId(0)
|
||||
.setHeroTId(heroTid)
|
||||
.build();
|
||||
list.add(builder);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue