Commit d5b8446f authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/Fluorohydride/ygopro

parents a6fd5825 bf6356b8
......@@ -1068,6 +1068,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
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(1)] = BufferIO::ReadInt32(pbuf);
myswprintf(mainGame->dInfo.strLP[0], L"%d", mainGame->dInfo.lp[0]);
......
......@@ -10,7 +10,7 @@
#include "netserver.h"
#include "single_mode.h"
const unsigned short PRO_VERSION = 0x1348;
const unsigned short PRO_VERSION = 0x1349;
namespace ygo {
......
......@@ -445,20 +445,21 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
char startbuf[32], *pbuf = startbuf;
BufferIO::WriteInt8(pbuf, MSG_START);
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::WriteInt16(pbuf, query_field_count(pduel, 0, 0x1));
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, 0x40));
NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 18);
NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 19);
startbuf[1] = 1;
NetServer::SendBufferToPlayer(players[1], STOC_GAME_MSG, startbuf, 18);
NetServer::SendBufferToPlayer(players[1], STOC_GAME_MSG, startbuf, 19);
if(!swapped)
startbuf[1] = 0x10;
else startbuf[1] = 0x11;
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);
RefreshExtra(0);
RefreshExtra(1);
start_duel(pduel, opt);
......
......@@ -445,22 +445,23 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
char startbuf[32], *pbuf = startbuf;
BufferIO::WriteInt8(pbuf, MSG_START);
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::WriteInt16(pbuf, query_field_count(pduel, 0, 0x1));
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, 0x40));
NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 18);
NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, startbuf, 19);
NetServer::ReSendToPlayer(players[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]);
if(!swapped)
startbuf[1] = 0x10;
else startbuf[1] = 0x11;
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);
RefreshExtra(0);
RefreshExtra(1);
start_duel(pduel, opt);
......
Subproject commit f66541cd4744d5978826a6f4ae184ddfe0d37b07
Subproject commit 86e5aa82650d9dc3f103891845dd76eb473c87f2
Subproject commit f3c20205858de66cd956871c3e1db1a5a62b6638
Subproject commit 68a3de27cbd22e6cf74157feeaa2b8e5ee455636
......@@ -568,6 +568,7 @@
!counter 0x104d 信号指示物
!counter 0x4e 指示物(魂之灵摆)
!counter 0x104f 蛊指示物
!counter 0x50 指示物(娱乐伙伴 掉头跑骑兵)
#setnames, using tab for comment
!setname 0x1 正义盟军 AOJ
!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