登峰造极bug处理
parent
7c534b9955
commit
b0c8a8627f
|
|
@ -11,10 +11,7 @@ import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||||
import com.ljsd.jieling.logic.GlobleSystemLogic;
|
import com.ljsd.jieling.logic.GlobleSystemLogic;
|
||||||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||||
import com.ljsd.jieling.logic.activity.event.NewWelfareEvent;
|
import com.ljsd.jieling.logic.activity.event.*;
|
||||||
import com.ljsd.jieling.logic.activity.event.NewWelfareTypeEnum;
|
|
||||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
|
||||||
import com.ljsd.jieling.logic.activity.event.SuperBoxEvent;
|
|
||||||
import com.ljsd.jieling.logic.dao.*;
|
import com.ljsd.jieling.logic.dao.*;
|
||||||
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
|
@ -228,6 +225,8 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
||||||
Poster.getPoster().dispatchEvent(new SuperBoxEvent(user.getId(),SuperBoxEvent.default_id));
|
Poster.getPoster().dispatchEvent(new SuperBoxEvent(user.getId(),SuperBoxEvent.default_id));
|
||||||
// 超值基金,老玩家兼容
|
// 超值基金,老玩家兼容
|
||||||
Poster.getPoster().dispatchEvent(new SuperBoxEvent(user.getId(),SuperBoxEvent.fund_old_user));
|
Poster.getPoster().dispatchEvent(new SuperBoxEvent(user.getId(),SuperBoxEvent.fund_old_user));
|
||||||
|
// 登峰造极
|
||||||
|
Poster.getPoster().dispatchEvent(new HeroUpStarEvent(user.getId(),10023,0));
|
||||||
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,0,user);
|
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,0,user);
|
||||||
MessageUtil.sendIndicationMessage(iSession, 1, MessageTypeProto.MessageType.WorldLevelIndication_VALUE, PlayerInfoProto.WorldLevelIndication.newBuilder().setWorldLeve(GlobleSystemLogic.getGlobalWorldLevelCache()).build(), true);
|
MessageUtil.sendIndicationMessage(iSession, 1, MessageTypeProto.MessageType.WorldLevelIndication_VALUE, PlayerInfoProto.WorldLevelIndication.newBuilder().setWorldLeve(GlobleSystemLogic.getGlobalWorldLevelCache()).build(), true);
|
||||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
||||||
|
|
|
||||||
|
|
@ -33,19 +33,14 @@ public class HeroStarActivity extends AbstractActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
User user = null;
|
|
||||||
if(event instanceof FiveStarGetEvent){
|
HeroUpStarEvent heroUpStarEvent = (HeroUpStarEvent) event;
|
||||||
FiveStarGetEvent fiveStarGetEvent = (FiveStarGetEvent)event;
|
if (!(event instanceof HeroUpStarEvent)) {
|
||||||
if(heroId != fiveStarGetEvent.getHeroid())
|
return;
|
||||||
return;
|
|
||||||
user = UserManager.getUser(fiveStarGetEvent.getUid());
|
|
||||||
}else if(event instanceof HeroUpStarEvent){
|
|
||||||
HeroUpStarEvent heroUpStarEvent = (HeroUpStarEvent) event;
|
|
||||||
if(heroUpStarEvent.getHeroTid() != heroId){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
user = UserManager.getUser(heroUpStarEvent.getUid());
|
|
||||||
}
|
}
|
||||||
|
User user = UserManager.getUser(heroUpStarEvent.getUid());
|
||||||
|
|
||||||
|
int heroTid = ((HeroUpStarEvent) event).getHeroTid();
|
||||||
|
|
||||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(id);
|
||||||
if( null == activityMission){
|
if( null == activityMission){
|
||||||
|
|
@ -54,13 +49,11 @@ public class HeroStarActivity extends AbstractActivity {
|
||||||
Map<Integer, ActivityProgressInfo> activityProgressInfoMap = activityMission.getActivityMissionMap();
|
Map<Integer, ActivityProgressInfo> activityProgressInfoMap = activityMission.getActivityMissionMap();
|
||||||
List<SActivityRewardConfig> list = SActivityRewardConfig.getsActivityRewardConfigByActivityId(id);
|
List<SActivityRewardConfig> list = SActivityRewardConfig.getsActivityRewardConfigByActivityId(id);
|
||||||
|
|
||||||
int maxstar = user.getHeroManager().getHeroStarMap().get(heroId);
|
int maxstar = user.getHeroManager().getHeroStarMap().get(heroTid);
|
||||||
for (SActivityRewardConfig sActivityRewardConfig : list) {
|
for (SActivityRewardConfig sActivityRewardConfig : list) {
|
||||||
if (maxstar >= sActivityRewardConfig.getValues()[0][1]) {
|
if (sActivityRewardConfig.getValues()[0][0] == heroTid && maxstar >= sActivityRewardConfig.getValues()[0][1]) {
|
||||||
ActivityProgressInfo activityProgressInfo = activityProgressInfoMap.getOrDefault(sActivityRewardConfig.getId(), null);
|
ActivityProgressInfo activityProgressInfo = activityProgressInfoMap.getOrDefault(sActivityRewardConfig.getId(), null);
|
||||||
if (null == activityProgressInfo)
|
if (null != activityProgressInfo && activityProgressInfo.getState()<1) {
|
||||||
continue;
|
|
||||||
if(activityProgressInfo.getState()<1){
|
|
||||||
activityProgressInfo.setState(1);
|
activityProgressInfo.setState(1);
|
||||||
}else{
|
}else{
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue