Commit 9ea66949 authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents 15b15827 da3f2bc4
No preview for this file type
...@@ -984,7 +984,7 @@ void Game::DrawSpec() { ...@@ -984,7 +984,7 @@ void Game::DrawSpec() {
break; break;
} }
} }
if (auto_watch_mode & showcardcode < 8 && showcardcode > 0) { if (auto_watch_mode && showcardcode < 8 && showcardcode > 0) {
mainGame->ShowCardInfo(showcardcode); mainGame->ShowCardInfo(showcardcode);
} }
} }
......
...@@ -1206,6 +1206,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1206,6 +1206,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else else
mainGame->dInfo.tag_player[0] = true; mainGame->dInfo.tag_player[0] = true;
} }
mainGame->dInfo.duel_rule = BufferIO::ReadInt8(pbuf);
mainGame->dInfo.lp[mainGame->LocalPlayer(0)] = BufferIO::ReadInt32(pbuf); mainGame->dInfo.lp[mainGame->LocalPlayer(0)] = BufferIO::ReadInt32(pbuf);
mainGame->dInfo.lp[mainGame->LocalPlayer(1)] = BufferIO::ReadInt32(pbuf); mainGame->dInfo.lp[mainGame->LocalPlayer(1)] = BufferIO::ReadInt32(pbuf);
mainGame->dInfo.start_lp[0] = mainGame->dInfo.lp[0]; mainGame->dInfo.start_lp[0] = mainGame->dInfo.lp[0];
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <regex> #include <regex>
#endif //YGOPRO_SERVER_MODE #endif //YGOPRO_SERVER_MODE
unsigned short PRO_VERSION = 0x1348; unsigned short PRO_VERSION = 0x1349;
namespace ygo { namespace ygo {
......
...@@ -570,25 +570,26 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { ...@@ -570,25 +570,26 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
char startbuf[32], *pbuf = startbuf; char startbuf[32], *pbuf = startbuf;
BufferIO::WriteInt8(pbuf, MSG_START); BufferIO::WriteInt8(pbuf, MSG_START);
BufferIO::WriteInt8(pbuf, 0); BufferIO::WriteInt8(pbuf, 0);
BufferIO::WriteInt8(pbuf, host_info.duel_rule);
BufferIO::WriteInt32(pbuf, host_info.start_lp); BufferIO::WriteInt32(pbuf, host_info.start_lp);
BufferIO::WriteInt32(pbuf, host_info.start_lp); BufferIO::WriteInt32(pbuf, host_info.start_lp);
BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x1)); BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x1));
BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x40)); BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x40));
BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x1)); BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x1));
BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x40)); BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x40));
NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 19);
startbuf[1] = 1; startbuf[1] = 1;
NetServer::SendBufferToPlayer(players[1], STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(players[1], STOC_GAME_MSG, startbuf, 19);
if(!swapped) if(!swapped)
startbuf[1] = 0x10; startbuf[1] = 0x10;
else startbuf[1] = 0x11; else startbuf[1] = 0x11;
for(auto oit = observers.begin(); oit != observers.end(); ++oit) for(auto oit = observers.begin(); oit != observers.end(); ++oit)
NetServer::SendBufferToPlayer(*oit, STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(*oit, STOC_GAME_MSG, startbuf, 19);
#ifdef YGOPRO_SERVER_MODE #ifdef YGOPRO_SERVER_MODE
if(cache_recorder) if(cache_recorder)
NetServer::SendBufferToPlayer(cache_recorder, STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(cache_recorder, STOC_GAME_MSG, startbuf, 19);
if(replay_recorder) if(replay_recorder)
NetServer::SendBufferToPlayer(replay_recorder, STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(replay_recorder, STOC_GAME_MSG, startbuf, 19);
turn_player = 0; turn_player = 0;
phase = 1; phase = 1;
#endif #endif
......
...@@ -572,27 +572,28 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { ...@@ -572,27 +572,28 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
char startbuf[32], *pbuf = startbuf; char startbuf[32], *pbuf = startbuf;
BufferIO::WriteInt8(pbuf, MSG_START); BufferIO::WriteInt8(pbuf, MSG_START);
BufferIO::WriteInt8(pbuf, 0); BufferIO::WriteInt8(pbuf, 0);
BufferIO::WriteInt8(pbuf, host_info.duel_rule);
BufferIO::WriteInt32(pbuf, host_info.start_lp); BufferIO::WriteInt32(pbuf, host_info.start_lp);
BufferIO::WriteInt32(pbuf, host_info.start_lp); BufferIO::WriteInt32(pbuf, host_info.start_lp);
BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x1)); BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x1));
BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x40)); BufferIO::WriteInt16(pbuf, query_field_count(pduel, 0, 0x40));
BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x1)); BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x1));
BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x40)); BufferIO::WriteInt16(pbuf, query_field_count(pduel, 1, 0x40));
NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 19);
NetServer::ReSendToPlayer(players[1]); NetServer::ReSendToPlayer(players[1]);
startbuf[1] = 1; startbuf[1] = 1;
NetServer::SendBufferToPlayer(players[2], STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(players[2], STOC_GAME_MSG, startbuf, 19);
NetServer::ReSendToPlayer(players[3]); NetServer::ReSendToPlayer(players[3]);
if(!swapped) if(!swapped)
startbuf[1] = 0x10; startbuf[1] = 0x10;
else startbuf[1] = 0x11; else startbuf[1] = 0x11;
for(auto oit = observers.begin(); oit != observers.end(); ++oit) for(auto oit = observers.begin(); oit != observers.end(); ++oit)
NetServer::SendBufferToPlayer(*oit, STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(*oit, STOC_GAME_MSG, startbuf, 19);
#ifdef YGOPRO_SERVER_MODE #ifdef YGOPRO_SERVER_MODE
if(cache_recorder) if(cache_recorder)
NetServer::SendBufferToPlayer(cache_recorder, STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(cache_recorder, STOC_GAME_MSG, startbuf, 19);
if(replay_recorder) if(replay_recorder)
NetServer::SendBufferToPlayer(replay_recorder, STOC_GAME_MSG, startbuf, 18); NetServer::SendBufferToPlayer(replay_recorder, STOC_GAME_MSG, startbuf, 19);
turn_player = 0; turn_player = 0;
phase = 1; phase = 1;
#endif #endif
......
Subproject commit 60eb18014a0537d65944850617753f45ca08de03 Subproject commit 4171d93b92670c988059ce9e0236ba2c79ce5010
1 ICON "ygopro.ico" 1 ICON "ygopro.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 1, 0, 34, 8 FILEVERSION 1, 0, 34, 9
PRODUCTVERSION 1, 0, 34, 8 PRODUCTVERSION 1, 0, 34, 9
FILEOS 0x4 FILEOS 0x4
FILETYPE 0x1 FILETYPE 0x1
...@@ -16,8 +16,8 @@ VALUE "InternalName", "YGOPRO Server Mode" ...@@ -16,8 +16,8 @@ VALUE "InternalName", "YGOPRO Server Mode"
VALUE "LegalCopyright", "Copyright (C) 2018 Nanahira" VALUE "LegalCopyright", "Copyright (C) 2018 Nanahira"
VALUE "OriginalFilename", "ygopro.exe" VALUE "OriginalFilename", "ygopro.exe"
VALUE "ProductName", "YGOPRO Server Mode" VALUE "ProductName", "YGOPRO Server Mode"
VALUE "FileVersion", "1.034.8.Koishi" VALUE "FileVersion", "1.034.9.Koishi"
VALUE "ProductVersion", "1.034.8.Koishi" VALUE "ProductVersion", "1.034.9.Koishi"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
......
Subproject commit 6e98bf821eda80175f219a263cff6e53ab5c589c Subproject commit 68a3de27cbd22e6cf74157feeaa2b8e5ee455636
...@@ -577,6 +577,7 @@ ...@@ -577,6 +577,7 @@
!counter 0x104d 信号指示物 !counter 0x104d 信号指示物
!counter 0x4e 指示物(魂之灵摆) !counter 0x4e 指示物(魂之灵摆)
!counter 0x104f 蛊指示物 !counter 0x104f 蛊指示物
!counter 0x50 指示物(娱乐伙伴 掉头跑骑兵)
#setnames, using tab for comment #setnames, using tab for comment
!setname 0x1 正义盟军 AOJ !setname 0x1 正义盟军 AOJ
!setname 0x2 次世代 ジェネクス !setname 0x2 次世代 ジェネクス
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment