五星推送修改
parent
638b4e1cbd
commit
1c6c979615
|
@ -149,9 +149,6 @@ public abstract class AbstractActivity implements IActivity, IEventHandler {
|
|||
//up miss
|
||||
int[][] reward = sActivityRewardConfig.getReward();
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, reward, BIReason.TAKE_ACTIVITY_REWARD);
|
||||
if(drop.getHeroList().size() > 0){
|
||||
fiveStarPushByActivity(user,drop.getHero(0).getHeroId(),1);
|
||||
}
|
||||
checkAndSetProgress(activityMission, activityProgressInfo, missionId);
|
||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||
if (null != sGlobalActivity && ActivityLogic.getInstance().checkActivityMissionFinishAndTaked(session.getUid(),id, activityMission) && sGlobalActivity.getResetGrade() == 1) {
|
||||
|
@ -381,13 +378,4 @@ public abstract class AbstractActivity implements IActivity, IEventHandler {
|
|||
MessageUtil.sendIndicationMessage(sessionByUid, 1, MessageTypeProto.MessageType.PRIVILLEGE_ADD_INDICATION_VALUE, indication.build(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
*五星推送
|
||||
*/
|
||||
public static void fiveStarPushByActivity(User user,int itemId,int num){
|
||||
SCHero scHero = SCHero.getsCHero().get(itemId);
|
||||
if(scHero != null && scHero.getStar()==5){
|
||||
Poster.getPoster().dispatchEvent(new HeroFiveStarGetEvent(user.getId(),5,num));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1583,9 +1583,6 @@ public class ActivityLogic implements IEventHandler{
|
|||
// 特权消耗
|
||||
PlayerLogic.getInstance().checkAndUpdate(user, setting.getMaxTimes(), num);
|
||||
|
||||
if(drop.getHeroList().size()>1){
|
||||
Poster.getPoster().dispatchEvent(new HeroFiveStarGetEvent(user.getId(),5,drop.getHeroList().size()));
|
||||
}
|
||||
// 事件分发
|
||||
Poster.getPoster().dispatchEvent(new ChoiceDrawCardEvent(user.getId(),activityId,num));
|
||||
|
||||
|
|
|
@ -1140,9 +1140,6 @@ public class HeroLogic{
|
|||
|
||||
rankUpHeroExecute(targetHero);
|
||||
Poster.getPoster().dispatchEvent(new HeroUpStarEvent(user.getId(),targetHero.getTemplateId(),targetHero.getStar()));
|
||||
if (targetHero.getStar()==5){
|
||||
Poster.getPoster().dispatchEvent(new HeroFiveStarGetEvent(user.getId(), targetHero.getStar(),1));
|
||||
}
|
||||
|
||||
targetHero.setStarBreakId(scHeroRankUpConfig.getId());
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.HERO_UP,2,targetHero.getTemplateId(),targetHero.getStar());
|
||||
|
@ -2490,9 +2487,6 @@ public class HeroLogic{
|
|||
Map<Integer,Integer> randomMap = new ConcurrentHashMap<>();
|
||||
randomMap.put(itemId, composeNum);
|
||||
CommonProto.Drop.Builder drop = ItemUtil.useRandomItem(user,randomMap, BIReason.COMPOS_HERO_REWARD);
|
||||
if(drop.getHeroList().size()>0){
|
||||
fiveStarPushByCombine(user,drop.getHero(0).getHeroId(), composeNum);
|
||||
}
|
||||
if(drop.getPokemonList().size()>0){
|
||||
fiveStarPokemonPushByCombine(user,drop.getPokemonList().get(0).getTempId(),composeNum);
|
||||
}
|
||||
|
@ -4596,15 +4590,6 @@ public class HeroLogic{
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*五星推送
|
||||
*/
|
||||
public static void fiveStarPushByCombine(User user,int itemId,int num){
|
||||
SCHero scHero = SCHero.getsCHero().get(itemId);
|
||||
if(scHero != null && scHero.getStar()==5){
|
||||
Poster.getPoster().dispatchEvent(new HeroFiveStarGetEvent(user.getId(),5,num));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*五星灵兽推送
|
||||
|
|
|
@ -1263,6 +1263,9 @@ public class ItemUtil {
|
|||
SItem sItem = SItem.getsItemMap().get(entry.getKey());
|
||||
extraDropAop(user,dropBuilder,sItem);
|
||||
}
|
||||
if(reason != BIReason.HERO_RANDOM){
|
||||
fiveStarPushByCombine(user,entry.getKey(),count);
|
||||
}
|
||||
}
|
||||
if (reward.length() > 0) {
|
||||
int nowTime = (int) (TimeUtils.now() / 1000);
|
||||
|
@ -1716,4 +1719,14 @@ public class ItemUtil {
|
|||
return 0L;
|
||||
}
|
||||
|
||||
/**
|
||||
*五星推送
|
||||
*/
|
||||
public static void fiveStarPushByCombine(User user,int itemId,int num){
|
||||
SCHero scHero = SCHero.getsCHero().get(itemId);
|
||||
if(scHero != null && scHero.getStar()==5){
|
||||
Poster.getPoster().dispatchEvent(new HeroFiveStarGetEvent(user.getId(),5,num));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue