社稷大典提交
parent
a44c3aa81f
commit
5b660609f4
|
|
@ -1308,4 +1308,16 @@ public class RedisUtil {
|
|||
}
|
||||
|
||||
|
||||
public void remove(String key){
|
||||
|
||||
for (int i = 0; i < MAX_TRY_TIMES; i++) {
|
||||
try {
|
||||
redisTemplate.delete(key);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,8 @@ public class ActivityLogic implements IEventHandler{
|
|||
if (null == abstractActivity) {
|
||||
continue;
|
||||
}
|
||||
if(openActivityIds.contains(sGlobalActivity.getId()))
|
||||
continue;
|
||||
abstractActivity.onActivityStart();
|
||||
openActivityIds.add(sGlobalActivity.getId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,21 +71,27 @@ class SheJiActivity extends AbstractActivity {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
//删除本榜单
|
||||
String key = RedisUtil.getInstence().getKey(RedisKey.EXPERT_RANK, Integer.toString(id));
|
||||
String key2 = RedisUtil.getInstence().getKey(RedisKey.GUILD_SHEJI_SCORE_RANK, Integer.toString(id));
|
||||
RedisUtil.getInstence().remove(key);
|
||||
RedisUtil.getInstence().remove(key2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initActivity(User user) throws Exception {
|
||||
super.initActivity(user);
|
||||
//初始化移除道具
|
||||
SGodSacrificeSetting sGodSacrificeSetting = STableManager.getConfig(SGodSacrificeSetting.class).get(1);
|
||||
if (null != sGodSacrificeSetting) {
|
||||
if (sGodSacrificeSetting.getItemDelete() == 1) {
|
||||
int[] activityItems = sGodSacrificeSetting.getActivityItems();
|
||||
for (int item : activityItems) {
|
||||
user.getItemManager().removeItem(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
// SGodSacrificeSetting sGodSacrificeSetting = STableManager.getConfig(SGodSacrificeSetting.class).get(1);
|
||||
// if (null != sGodSacrificeSetting) {
|
||||
// if (sGodSacrificeSetting.getItemDelete() == 1) {
|
||||
// int[] activityItems = sGodSacrificeSetting.getActivityItems();
|
||||
// for (int item : activityItems) {
|
||||
// user.getItemManager().removeItem(item);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue