Merge branch 'master_test_gn' into master_prb_gn
commit
1eaeb11f7b
|
@ -1,6 +1,5 @@
|
||||||
package com.ljsd.jieling.logic.dao;
|
package com.ljsd.jieling.logic.dao;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author hj
|
* @Author hj
|
||||||
|
@ -8,9 +7,7 @@ import java.io.Serializable;
|
||||||
* @Description:
|
* @Description:
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
public class WishDrawCardInfo implements Serializable {
|
public class WishDrawCardInfo implements Cloneable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -4813948169695919232L;
|
|
||||||
|
|
||||||
private int id;
|
private int id;
|
||||||
private int heroTid;
|
private int heroTid;
|
||||||
|
@ -45,4 +42,9 @@ public class WishDrawCardInfo implements Serializable {
|
||||||
public void setStatus(int status) {
|
public void setStatus(int status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WishDrawCardInfo clone() throws CloneNotSupportedException {
|
||||||
|
return (WishDrawCardInfo)super.clone();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -495,7 +495,18 @@ public class HeroLogic{
|
||||||
* @throws ErrorCodeException
|
* @throws ErrorCodeException
|
||||||
*/
|
*/
|
||||||
public void updateWishDrawCardInfo(User user, List<CommonProto.wishDrawCardInfo> list) throws ErrorCodeException {
|
public void updateWishDrawCardInfo(User user, List<CommonProto.wishDrawCardInfo> list) throws ErrorCodeException {
|
||||||
HashMap<Integer, WishDrawCardInfo> map = Utils.clone(user.getHeroManager().getWishDrawCardInfoMap());
|
HashMap<Integer, WishDrawCardInfo> wishDrawCardInfoMap = user.getHeroManager().getWishDrawCardInfoMap();
|
||||||
|
|
||||||
|
// 英雄拷贝
|
||||||
|
HashMap<Integer, WishDrawCardInfo> map = new HashMap<>(wishDrawCardInfoMap.size());
|
||||||
|
wishDrawCardInfoMap.forEach((k,v)->{
|
||||||
|
try {
|
||||||
|
map.put(k,v.clone());
|
||||||
|
} catch (CloneNotSupportedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 遍历
|
// 遍历
|
||||||
for (CommonProto.wishDrawCardInfo v : list) {
|
for (CommonProto.wishDrawCardInfo v : list) {
|
||||||
WishDrawCardInfo cardInfo = map.get(v.getId());
|
WishDrawCardInfo cardInfo = map.get(v.getId());
|
||||||
|
@ -527,8 +538,6 @@ public class HeroLogic{
|
||||||
else {
|
else {
|
||||||
user.getHeroManager().setWishDrawCardInfoMap(map);
|
user.getHeroManager().setWishDrawCardInfoMap(map);
|
||||||
}
|
}
|
||||||
// 推送消息
|
|
||||||
sendWishCardIndication(user);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeRandomItem(User user,int activityId,int[][] random){
|
private void changeRandomItem(User user,int activityId,int[][] random){
|
||||||
|
|
Loading…
Reference in New Issue