activity
parent
8293f6228f
commit
d325506268
|
@ -32,6 +32,9 @@ public class SGlobalActivity implements BaseConfig {
|
||||||
|
|
||||||
private String sesc;
|
private String sesc;
|
||||||
|
|
||||||
|
private int isSaving;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
public void init() throws Exception {
|
||||||
Map<Integer, SGlobalActivity> config = STableManager.getConfig(SGlobalActivity.class);
|
Map<Integer, SGlobalActivity> config = STableManager.getConfig(SGlobalActivity.class);
|
||||||
|
@ -104,4 +107,8 @@ public class SGlobalActivity implements BaseConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSesc() { return sesc; }
|
public String getSesc() { return sesc; }
|
||||||
|
|
||||||
|
public int getIsSaving() {
|
||||||
|
return isSaving;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -123,6 +123,11 @@ public class ActivityLogic {
|
||||||
Map<Integer, SGlobalActivity> sGlobalActivityMap = SGlobalActivity.getsGlobalActivityMap();
|
Map<Integer, SGlobalActivity> sGlobalActivityMap = SGlobalActivity.getsGlobalActivityMap();
|
||||||
for (Integer openActivityId : openActivityIds) {
|
for (Integer openActivityId : openActivityIds) {
|
||||||
SGlobalActivity sGlobalActivity = sGlobalActivityMap.get(openActivityId);
|
SGlobalActivity sGlobalActivity = sGlobalActivityMap.get(openActivityId);
|
||||||
|
|
||||||
|
ActivityMission activityMission = activityManager.getActivityMissionMap().get(openActivityId);
|
||||||
|
if (activityMission != null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(!initOtherActivity(user, sGlobalActivity)){
|
if(!initOtherActivity(user, sGlobalActivity)){
|
||||||
activityManager.initAllActivityMission(openActivityId);
|
activityManager.initAllActivityMission(openActivityId);
|
||||||
}
|
}
|
||||||
|
@ -231,7 +236,8 @@ public class ActivityLogic {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int activityStatus = activityMission.getActivityState();
|
int activityStatus = activityMission.getActivityState();
|
||||||
if (SGlobalActivity.getsGlobalActivityMap().get(activityId).getType() != 7 && activityStatus != ActivityType.OPEN_STATE) {
|
|
||||||
|
if (SGlobalActivity.getsGlobalActivityMap().get(activityId).getIsSaving()==0 && activityStatus != ActivityType.OPEN_STATE) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
SGlobalActivity sGlobalActivity = sGlobalActivityMap.get(activityId);
|
SGlobalActivity sGlobalActivity = sGlobalActivityMap.get(activityId);
|
||||||
|
|
|
@ -11,7 +11,7 @@ class CopyExpectRankActivity extends ExpectRankActivity {
|
||||||
public CopyExpectRankActivity(int id) {
|
public CopyExpectRankActivity(int id) {
|
||||||
super(id);
|
super(id);
|
||||||
//策划说 这个排行榜不开 以后可能会有
|
//策划说 这个排行榜不开 以后可能会有
|
||||||
// Poster.getPoster().listenEvent(this, StoryEvent.class);
|
Poster.getPoster().listenEvent(this, StoryEvent.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -17,6 +17,6 @@ class GoldExpectRankActivity extends ExpectRankActivity {
|
||||||
public void onEvent(IEvent event) throws Exception {
|
public void onEvent(IEvent event) throws Exception {
|
||||||
if (!(event instanceof GoldEvent))
|
if (!(event instanceof GoldEvent))
|
||||||
return;
|
return;
|
||||||
update(UserManager.getUser(((GoldEvent) event).getUid()), 1);
|
update(UserManager.getUser(((GoldEvent) event).getUid()), ((GoldEvent) event).getNum());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ class StaminaExpectRankActivity extends ExpectRankActivity {
|
||||||
public StaminaExpectRankActivity(int id) {
|
public StaminaExpectRankActivity(int id) {
|
||||||
super(id);
|
super(id);
|
||||||
//策划说 这个排行榜不开 以后可能会有
|
//策划说 这个排行榜不开 以后可能会有
|
||||||
//Poster.getPoster().listenEvent(this, UseItemEvent.class);
|
Poster.getPoster().listenEvent(this, UseItemEvent.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -7,8 +7,15 @@ public class GoldEvent implements IEvent {
|
||||||
|
|
||||||
private int uid;
|
private int uid;
|
||||||
|
|
||||||
public GoldEvent(int uid) {
|
private int num;
|
||||||
|
|
||||||
|
public GoldEvent(int uid, int num) {
|
||||||
this.uid = uid;
|
this.uid = uid;
|
||||||
|
this.num = num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNum() {
|
||||||
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUid() {
|
public int getUid() {
|
||||||
|
|
|
@ -283,7 +283,7 @@ public class StoreLogic {
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.BUY_MATERIAL,sStoreConfig.getGoods()[0][0],itemNum);
|
user.getUserMissionManager().onGameEvent(user, GameEvent.BUY_MATERIAL,sStoreConfig.getGoods()[0][0],itemNum);
|
||||||
}
|
}
|
||||||
if(itemId==10005){
|
if(itemId==10005){
|
||||||
Poster.getPoster().dispatchEvent(new GoldEvent(user.getId()));
|
Poster.getPoster().dispatchEvent(new GoldEvent(user.getId(),itemNum));
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerInfoProto.BuyStoreItemResponse builder = PlayerInfoProto.BuyStoreItemResponse.newBuilder().setDrop(drop).build();
|
PlayerInfoProto.BuyStoreItemResponse builder = PlayerInfoProto.BuyStoreItemResponse.newBuilder().setDrop(drop).build();
|
||||||
|
|
Loading…
Reference in New Issue