限时抽卡 寻仙榜修改
parent
13c8f3f685
commit
fb104288e5
|
@ -60,7 +60,7 @@ public class LimitRandomCardActivity extends AbstractActivity {
|
||||||
randomRank.addRank(cardEvent.getUid(),String.valueOf(id),scoreById+cardEvent.getScore());
|
randomRank.addRank(cardEvent.getUid(),String.valueOf(id),scoreById+cardEvent.getScore());
|
||||||
Predicate<int[]> pre = a-> (SCHero.getHeroByPieceId(a[0])!=null&&SCHero.getHeroByPieceId(a[0]).getNatural()>=13);
|
Predicate<int[]> pre = a-> (SCHero.getHeroByPieceId(a[0])!=null&&SCHero.getHeroByPieceId(a[0]).getNatural()>=13);
|
||||||
|
|
||||||
Consumer<int[]> consumer = a->RankContext.getRankEnum(RankEnum.RANDOM_CARD_PERFECT_RANK.getType()).addRank(cardEvent.getUid(),String.valueOf(id), TimeUtils.now()/1000,a[0]);
|
Consumer<int[]> consumer = a->RankContext.getRankEnum(RankEnum.RANDOM_CARD_PERFECT_RANK.getType()).addRank(cardEvent.getUid(),String.valueOf(id), TimeUtils.now()/1000,a[0],a[1]);
|
||||||
Stream.of(cardEvent.getHeros()).filter(pre).forEach(consumer);
|
Stream.of(cardEvent.getHeros()).filter(pre).forEach(consumer);
|
||||||
update(UserManager.getUser(cardEvent.getUid()),cardEvent.getScore());
|
update(UserManager.getUser(cardEvent.getUid()),cardEvent.getScore());
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.ljsd.jieling.logic.family;
|
package com.ljsd.jieling.logic.family;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import com.google.protobuf.GeneratedMessage;
|
import com.google.protobuf.GeneratedMessage;
|
||||||
import com.ljsd.GameApplication;
|
import com.ljsd.GameApplication;
|
||||||
import com.ljsd.jieling.core.GlobalsDef;
|
import com.ljsd.jieling.core.GlobalsDef;
|
||||||
|
@ -21,7 +20,6 @@ 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.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.RankLogic;
|
|
||||||
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
||||||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||||
import com.ljsd.jieling.network.session.ISession;
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
@ -35,13 +33,11 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import util.StringUtil;
|
import util.StringUtil;
|
||||||
import util.TimeUtils;
|
import util.TimeUtils;
|
||||||
import util.CellUtil;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class GuildLogic {
|
public class GuildLogic {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(GuildLogic.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(GuildLogic.class);
|
||||||
private static Gson gson = new Gson();
|
|
||||||
|
|
||||||
|
|
||||||
public static int getMemberType(int targetUid, Map<Integer, Set<Integer>> members ){
|
public static int getMemberType(int targetUid, Map<Integer, Set<Integer>> members ){
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class RandomCardPerfectRank extends AbstractRank {
|
||||||
doubles[2] = uid;
|
doubles[2] = uid;
|
||||||
// data[0]+"_"+data[1]+"_"+RedisUtil.getInstence().incrementZsetScore()
|
// data[0]+"_"+data[1]+"_"+RedisUtil.getInstence().incrementZsetScore()
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
String heroKey = gson.toJson(new RandomCardSpecialKey(uid, Double.valueOf(data[1]).intValue(), RedisUtil.getInstence().incr("incr_Card", 1)));
|
String heroKey = gson.toJson(new RandomCardSpecialKey(uid, Double.valueOf(data[1]).intValue(),Double.valueOf(data[2]).intValue(),RedisUtil.getInstence().incr("incr_Card", 1)));
|
||||||
RedisUtil.getInstence().zsetAddOne(key, heroKey, getScore(doubles));
|
RedisUtil.getInstence().zsetAddOne(key, heroKey, getScore(doubles));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public class RandomCardPerfectRank extends AbstractRank {
|
||||||
.setRank(index)
|
.setRank(index)
|
||||||
.setParam1(getParam1(data.getScore()))
|
.setParam1(getParam1(data.getScore()))
|
||||||
.setParam2(randomCardSpecialKey.getHeroId())
|
.setParam2(randomCardSpecialKey.getHeroId())
|
||||||
.setParam3(0)
|
.setParam3(randomCardSpecialKey.getHeroNum())
|
||||||
.build();
|
.build();
|
||||||
int guildId = everyUser.getPlayerInfoManager().getGuildId();
|
int guildId = everyUser.getPlayerInfoManager().getGuildId();
|
||||||
String familyName = "";
|
String familyName = "";
|
||||||
|
|
|
@ -8,6 +8,7 @@ package com.ljsd.jieling.logic.rank.rankKey;
|
||||||
public class RandomCardSpecialKey {
|
public class RandomCardSpecialKey {
|
||||||
private int uid;
|
private int uid;
|
||||||
private int heroId;
|
private int heroId;
|
||||||
|
private int heroNum;
|
||||||
private long version;
|
private long version;
|
||||||
|
|
||||||
public void setUid(int uid) {
|
public void setUid(int uid) {
|
||||||
|
@ -22,9 +23,18 @@ public class RandomCardSpecialKey {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RandomCardSpecialKey(int uid, int heroId, long version) {
|
public int getHeroNum() {
|
||||||
|
return heroNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeroNum(int heroNum) {
|
||||||
|
this.heroNum = heroNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RandomCardSpecialKey(int uid, int heroId,int heroNum, long version) {
|
||||||
this.uid = uid;
|
this.uid = uid;
|
||||||
this.heroId = heroId;
|
this.heroId = heroId;
|
||||||
|
this.heroNum = heroNum;
|
||||||
this.version = version;
|
this.version = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue