master
精美科技 2026-06-16 09:02:39 +08:00
parent 896938a8fa
commit 9a944df600
10 changed files with 18 additions and 9 deletions

View File

@ -14,6 +14,7 @@
<module name="taurus-web" />
<module name="game_zp_fangpaofa" />
<module name="data_cache" />
<module name="game_mj_hongzhong" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>

View File

@ -5,6 +5,8 @@
<file url="file://$PROJECT_DIR$/data_cache/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/game_common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/game_common/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/game_mj_hongzhong/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/game_mj_hongzhong/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/game_zp_fangpaofa/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/game_zp_fangpaofa/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/taurus-permanent/src/main/java" charset="UTF-8" />

View File

@ -11,6 +11,7 @@
<option value="$PROJECT_DIR$/data_cache/pom.xml" />
<option value="$PROJECT_DIR$/web_group/pom.xml" />
<option value="$PROJECT_DIR$/game_zp_fangpaofa/pom.xml" />
<option value="$PROJECT_DIR$/game_mj_hongzhong/pom.xml" />
</list>
</option>
</component>

View File

@ -415,6 +415,7 @@ public class Player {
public void sendEvent(String cmd, ITObject param) {
if (!this.isConnect)
return;
Global.logger.info("user ip:"+this.sender.getAddress());
MainServer.instance.sendEvent(cmd, param, this.sender);
}

View File

@ -1071,8 +1071,8 @@ public class GroupRoomService {
String gameId1 = jedis11.hget("g{383709}:play:"+pid,"gameId");
String robot_host = null;
if(StringUtil.isNotEmpty(gameId1)) {
if (Integer.parseInt(gameId1) == 10) {
robot_host = "8.138.120.132:8701";
if (Integer.parseInt(gameId1) == 17) {
robot_host = "8.138.120.132:8917";
}
if (Integer.parseInt(gameId1) == 22) {
robot_host = "8.138.120.132:8722";
@ -1102,17 +1102,19 @@ public class GroupRoomService {
*/
public static ITObject sendRobotData(String roomid,int groupid,String robot_host,int gameId){
Jedis js1 = Redis.use("group1_db3").getJedis();
//Jedis js1 = Redis.use("group1_db3").getJedis();
String flag = js1.get("roomsend"+roomid);
if(flag!=null){
return null;
}
log.info("sendRobotData :"+roomid+"groupid:"+groupid+"robot_host:"+robot_host);
CompletableFuture<String> future = CompletableFuture.supplyAsync(() -> {
// 执行任务
//Jedis js1 = Redis.use("group1_db2").getJedis();
Jedis js1 = Redis.use("group1_db3").getJedis();
String flag = js1.get("roomsend"+roomid);
if(flag!=null){
js1.close();
return null;
}
js1.set("roomsend"+roomid,1+"");
js1.expire("roomsend"+roomid,5);
try {
@ -1133,6 +1135,7 @@ public class GroupRoomService {
int robotid = 0;
//
Set<String> jsRobot = js1.smembers("robots");
String wokelock = "wokelock";
for (String key : jsRobot) {
String tmp = js1.get(wokelock+key);
@ -1145,7 +1148,7 @@ public class GroupRoomService {
js1.set(wokelock+robotid, String.valueOf(1));
js1.expire(wokelock+robotid,2);
TaurusClient client = new TaurusClient(robot_host, "games"+robotid, TaurusClient.ConnectionProtocol.Tcp);
client.setSession("abbccccd");
client.setSession("abbccccd"+robotid+roomid);
client.connect();
sleep(1500);
ITObject params = TObject.newInstance();
@ -1165,6 +1168,7 @@ public class GroupRoomService {
}
eventThread.yield();
log.info("sendRobotData :"+roomid+"robotid:"+robotid);
js1.close();
}catch (Exception e){
js1.close();
}finally {

Binary file not shown.