家园建筑gm,修改1
parent
f0a19957b2
commit
6f35e726a0
|
|
@ -2,7 +2,12 @@ package com.ljsd.jieling.kefu;
|
|||
|
||||
import com.ljsd.jieling.logic.dao.ArchitectureInfo;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import config.SHomeLandLevel;
|
||||
import manager.STableManager;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author hj
|
||||
* @Date 2021/10/28 17:11:17
|
||||
|
|
@ -12,13 +17,17 @@ import util.TimeUtils;
|
|||
public class Cmd_homelevel extends GmRoleAbstract{
|
||||
@Override
|
||||
public boolean exec(String[] args) throws Exception {
|
||||
if (args.length >= 2){
|
||||
if (args.length >= 1){
|
||||
User user = getUser();
|
||||
int id = Integer.parseInt(args[0]);
|
||||
int level = Integer.parseInt(args[1]);
|
||||
Map<Integer, SHomeLandLevel> config = STableManager.getConfig(SHomeLandLevel.class);
|
||||
SHomeLandLevel landLevel = config.get(id);
|
||||
if (landLevel == null){
|
||||
return false;
|
||||
}
|
||||
int time = args.length > 2?Integer.parseInt(args[2]):TimeUtils.nowInt();
|
||||
ArchitectureInfo info = new ArchitectureInfo(level, time, 0);
|
||||
user.getPlayerInfoManager().putArchitectureInfo(id,info);
|
||||
ArchitectureInfo info = new ArchitectureInfo(landLevel.getId(), time, 0);
|
||||
user.getPlayerInfoManager().putArchitectureInfo(landLevel.getPoolID(),info);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue