Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
00e4818aff
|
@ -20,13 +20,11 @@ import com.ljsd.jieling.protocols.MessageTypeProto;
|
|||
import com.ljsd.jieling.thrift.idl.InvalidOperException;
|
||||
import com.ljsd.jieling.thrift.idl.RPCRequestGMIFace;
|
||||
import com.ljsd.jieling.thrift.idl.Result;
|
||||
import com.ljsd.jieling.util.AyyncWorker;
|
||||
import com.ljsd.jieling.util.InnerMessageUtil;
|
||||
import com.ljsd.jieling.util.MathUtils;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import com.ljsd.jieling.util.*;
|
||||
import org.apache.thrift.TException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
|
@ -98,7 +96,6 @@ public class GmService implements RPCRequestGMIFace.Iface {
|
|||
}
|
||||
|
||||
|
||||
|
||||
List<Integer> sendIds = new LinkedList<>();
|
||||
if (obj instanceof GmGlobleAbstract) {
|
||||
for (ISession session : OnlineUserManager.sessionMap.values()) {
|
||||
|
@ -116,12 +113,22 @@ public class GmService implements RPCRequestGMIFace.Iface {
|
|||
}
|
||||
}else if(cmd.contains("recharge")){
|
||||
sendIds.addAll(rechargeInfoMap.keySet());
|
||||
}else if(cmd.contains("force")){
|
||||
|
||||
Set<ZSetOperations.TypedTuple<String>> rankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.FORCE_RANK, "", 0, -1);
|
||||
for (ZSetOperations.TypedTuple<String> item : rankInfo) {
|
||||
String value = item.getValue();
|
||||
int uid = Integer.parseInt(value);
|
||||
sendIds.add(uid);
|
||||
}
|
||||
|
||||
} else{
|
||||
String[] ids = parameters[0].split("#");
|
||||
for (String id : ids) {
|
||||
sendIds.add(Integer.valueOf(id));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
int randomTime = sendIds.size() * 1;
|
||||
//两分钟内发完所有协议
|
||||
|
|
|
@ -198,8 +198,11 @@ public class ActivityLogic {
|
|||
if (null==abstractActivity) {
|
||||
continue;
|
||||
}
|
||||
abstractActivity .onActivityEndSelfWithDealReward(user);
|
||||
abstractActivity.onActivityEndSelfWithDealReward(user);
|
||||
activityManager.removeActivity(activityId);
|
||||
if(sGlobalActivity.getShopId()!=0){
|
||||
user.getStoreManager().removeStoreInfo(sGlobalActivity.getShopId());
|
||||
}
|
||||
LOGGER.info("the uid={},remove the activity id ={}", user.getId(), activityId);
|
||||
if (builder != null) {
|
||||
builder.addCloseActivityId(activityId);
|
||||
|
|
|
@ -1301,11 +1301,7 @@ public class HeroLogic {
|
|||
|
||||
public int calHeoForce(User user, Hero hero,boolean isMyself){
|
||||
Map<Integer, Integer> heroAllAttribute;
|
||||
if(!isMyself || user.getMapManager().getCurMapId() == 0){
|
||||
heroAllAttribute=calHeroNotBufferAttribute(user, hero,true,0);
|
||||
}else{
|
||||
heroAllAttribute = calHeroFinalAttributeWhenInMap(user, hero,true,0);
|
||||
}
|
||||
heroAllAttribute = calHeroNotBufferAttribute(user, hero,true,0);
|
||||
//战力保存
|
||||
int force = calForce(heroAllAttribute);
|
||||
return force + heroAllAttribute.get(HeroAttributeEnum.EquipForce.getPropertyId());
|
||||
|
|
|
@ -271,7 +271,7 @@ public class PlayerLogic {
|
|||
int uid = iSession.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
if(user.getTeamPosManager().getTeamPosForHero().containsKey(teamId)){
|
||||
int teamForce = HeroLogic.getInstance().calTeamTotalForce(user, teamId, true);
|
||||
int teamForce = HeroLogic.getInstance().calTeamTotalForce(user, teamId, false);
|
||||
if(user.getPlayerInfoManager().getMaxForce() < teamForce){
|
||||
user.getPlayerInfoManager().setMaxForce(teamForce);
|
||||
String key = RedisKey.getKey(RedisKey.FORCE_RANK, "", false);
|
||||
|
|
Loading…
Reference in New Issue