Commit e158112a authored by mercury233's avatar mercury233

Merge 5.1.3

parents 5b42a121 7a2e3e76
...@@ -45,3 +45,5 @@ Release/ ...@@ -45,3 +45,5 @@ Release/
AI_core_vs2017solution/core.VC.db AI_core_vs2017solution/core.VC.db
AI_core_vs2017solution/core.VC.VC.opendb AI_core_vs2017solution/core.VC.VC.opendb
AI_core_vs2017solution/System.Servicemodel.Faltexception.dll AI_core_vs2017solution/System.Servicemodel.Faltexception.dll
[Ll]ibrary_/
AI_core_vs2017solution/.vs
...@@ -1104,6 +1104,7 @@ namespace Percy ...@@ -1104,6 +1104,7 @@ namespace Percy
move(1); move(1);
break; break;
case GameMessage.ShuffleSetCard: case GameMessage.ShuffleSetCard:
move(1);
move(move(1) * 8); move(move(1) * 8);
break; break;
case GameMessage.ReverseDeck: case GameMessage.ReverseDeck:
......
fileFormatVersion: 2
guid: 54794da7cdfb0db47899df0fdd1a8025
timeCreated: 1523725217
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
...@@ -3,7 +3,7 @@ using System.Collections.Generic; ...@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
public static class Config public static class Config
{ {
public static uint ClientVersion = 0x1343; public static uint ClientVersion = 0x1344;
class oneString class oneString
{ {
......
...@@ -763,12 +763,11 @@ public static class BinaryExtensions ...@@ -763,12 +763,11 @@ public static class BinaryExtensions
} }
if ((flag & (int)Query.Owner) != 0) if ((flag & (int)Query.Owner) != 0)
r.ReadInt32(); r.ReadInt32();
if ((flag & (int)Query.IsDisabled) != 0) if ((flag & (int)Query.Status) != 0)
{ {
cardToRefresh.disabled = (r.ReadInt32() != 0); int status = r.ReadInt32();
cardToRefresh.disabled = (status & 0x0001) == 0x0001;
} }
if ((flag & (int)Query.IsPublic) != 0)
r.ReadInt32();
if ((flag & (int)Query.LScale) != 0) if ((flag & (int)Query.LScale) != 0)
data.LScale = r.ReadInt32(); data.LScale = r.ReadInt32();
if ((flag & (int)Query.RScale) != 0) if ((flag & (int)Query.RScale) != 0)
......
...@@ -1788,6 +1788,17 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1788,6 +1788,17 @@ public class Ocgcore : ServantWithCardDescription
printDuelLog(InterString.Get("骰子结果:[?]", data.ToString())); printDuelLog(InterString.Get("骰子结果:[?]", data.ToString()));
} }
break; break;
case GameMessage.HandResult:
data = r.ReadByte();
int data1 = data & 0x3;
int data2 = (data >> 2) & 0x3;
string res1 = (data1 == 1 ? "剪刀" : (data1 == 2 ? "布" : "石头"));
string res2 = (data2 == 1 ? "剪刀" : (data2 == 2 ? "布" : "石头"));
if (isFirst)
printDuelLog("猜拳结果:你好像出了" + res2 + data2.ToString() + ",对方好像出了" + res1 + data1.ToString());
else
printDuelLog("猜拳结果:你好像出了" + data1.ToString() + res1 + ",对方好像出了" + res2 + data2.ToString());
break;
case GameMessage.Attack: case GameMessage.Attack:
game_card = GCS_cardGet(r.ReadGPS(), false); game_card = GCS_cardGet(r.ReadGPS(), false);
string derectattack = ""; string derectattack = "";
...@@ -2301,6 +2312,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2301,6 +2312,7 @@ public class Ocgcore : ServantWithCardDescription
} }
break; break;
case GameMessage.ShuffleSetCard: case GameMessage.ShuffleSetCard:
location = r.ReadByte();
count = r.ReadByte(); count = r.ReadByte();
List<GPS> gpss = new List<GPS>(); List<GPS> gpss = new List<GPS>();
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
...@@ -3384,11 +3396,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3384,11 +3396,11 @@ public class Ocgcore : ServantWithCardDescription
} }
destroy(waitObject, 0, false, true); destroy(waitObject, 0, false, true);
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
bool finish = (r.ReadByte() != 0); bool finishable = (r.ReadByte() != 0);
cancalable = (r.ReadByte() != 0); cancalable = (r.ReadByte() != 0) || finishable;
ES_min = r.ReadByte(); ES_min = r.ReadByte();
ES_max = r.ReadByte(); ES_max = r.ReadByte();
ES_min = finish ? 0 : 1; // SelectUnselectCard can actually always select 1 card ES_min = finishable ? 0 : 1; // SelectUnselectCard can actually always select 1 card
ES_max = 1; // SelectUnselectCard can actually always select 1 card ES_max = 1; // SelectUnselectCard can actually always select 1 card
ES_level = 0; ES_level = 0;
count = r.ReadByte(); count = r.ReadByte();
...@@ -3421,14 +3433,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3421,14 +3433,10 @@ public class Ocgcore : ServantWithCardDescription
allCardsInSelectMessage.Add(card); allCardsInSelectMessage.Add(card);
}*/ }*/
} }
if (cancalable) if (cancalable && !finishable)
{ {
gameInfo.addHashedButton("cancleSelected", -1, superButtonType.no, InterString.Get("取消选择@ui")); gameInfo.addHashedButton("cancleSelected", -1, superButtonType.no, InterString.Get("取消选择@ui"));
} }
else if (finish)
{
gameInfo.addHashedButton("cancleSelected", -1, superButtonType.no, "完成选择");
}
realizeCardsForSelect(); realizeCardsForSelect();
if (ES_selectHint != "") if (ES_selectHint != "")
{ {
...@@ -3706,6 +3714,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3706,6 +3714,10 @@ public class Ocgcore : ServantWithCardDescription
} }
if ((positions & 0x8) > 0) if ((positions & 0x8) > 0)
{ {
if ((positions & 0x4) > 0)
{
op1 = 0x4;
}
op2 = 0x8; op2 = 0x8;
} }
RMSshow_position("return", code, new messageSystemValue { value = op1.ToString(), hint = "atk" }, new messageSystemValue { value = op2.ToString(), hint = "def" }); RMSshow_position("return", code, new messageSystemValue { value = op1.ToString(), hint = "atk" }, new messageSystemValue { value = op2.ToString(), hint = "def" });
...@@ -3915,7 +3927,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3915,7 +3927,7 @@ public class Ocgcore : ServantWithCardDescription
binaryMaster = new BinaryMaster(); binaryMaster = new BinaryMaster();
player = r.ReadByte(); player = r.ReadByte();
min = r.ReadByte(); min = r.ReadByte();
int field = ~r.ReadInt32(); int _field = ~r.ReadInt32();
if (Program.I().setting.setting.hand.value == true || Program.I().setting.setting.handm.value == true) if (Program.I().setting.setting.hand.value == true || Program.I().setting.setting.handm.value == true)
{ {
...@@ -3926,7 +3938,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3926,7 +3938,7 @@ public class Ocgcore : ServantWithCardDescription
bool pendulumZone = false; bool pendulumZone = false;
int filter; int filter;
if ((field & 0x7f0000) != 0) /*if ((field & 0x7f0000) != 0)
{ {
resp[0] = (byte)(1 - player); resp[0] = (byte)(1 - player);
resp[1] = 0x4; resp[1] = 0x4;
...@@ -3944,27 +3956,45 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3944,27 +3956,45 @@ public class Ocgcore : ServantWithCardDescription
resp[1] = 0x8; resp[1] = 0x8;
filter = (field >> 30) & 0x3; filter = (field >> 30) & 0x3;
pendulumZone = true; pendulumZone = true;
} }*/
else if ((field & 0x7f) != 0) for (int j=0; j<2; j++)
{
resp = new byte[3];
pendulumZone = false;
filter = 0;
int field;
if (j==0)
{ {
resp[0] = (byte)player; resp[0] = (byte)player;
field = _field & 0xffff;
}
else
{
resp[0] = (byte)(1 - player);
field = _field >> 16;
}
if ((field & 0x7f) != 0)
{
resp[1] = 0x4; resp[1] = 0x4;
filter = field & 0x7f; filter = field & 0x7f;
} }
else if ((field & 0x1f00) != 0) else if ((field & 0x1f00) != 0)
{ {
resp[0] = (byte)player;
resp[1] = 0x8; resp[1] = 0x8;
filter = (field >> 8) & 0x1f; filter = (field >> 8) & 0x1f;
} }
else else if ((field & 0xc000) != 0)
{ {
resp[0] = (byte)player;
resp[1] = 0x8; resp[1] = 0x8;
filter = (field >> 14) & 0x3; filter = (field >> 14) & 0x3;
pendulumZone = true; pendulumZone = true;
} }
if (filter == 0)
continue;
if (!pendulumZone) if (!pendulumZone)
{ {
if ((filter & 0x4) != 0) if ((filter & 0x4) != 0)
...@@ -4019,6 +4049,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4019,6 +4049,9 @@ public class Ocgcore : ServantWithCardDescription
createPlaceSelector(resp); createPlaceSelector(resp);
} }
} }
}
} }
if (Es_selectMSGHintType == 3) if (Es_selectMSGHintType == 3)
{ {
...@@ -4034,6 +4067,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4034,6 +4067,7 @@ public class Ocgcore : ServantWithCardDescription
} }
else else
{ {
int field = _field;
for (int i = 0; i < min; i++) for (int i = 0; i < min; i++)
{ {
byte[] resp = new byte[3]; byte[] resp = new byte[3];
...@@ -4105,6 +4139,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4105,6 +4139,11 @@ public class Ocgcore : ServantWithCardDescription
sendReturn(binaryMaster.get()); sendReturn(binaryMaster.get());
} }
break; break;
case GameMessage.RockPaperScissors:
binaryMaster = new BinaryMaster();
binaryMaster.writer.Write(UnityEngine.Random.Range(0, 2));
sendReturn(binaryMaster.get());
break;
case GameMessage.ConfirmDecktop: case GameMessage.ConfirmDecktop:
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
count = r.ReadByte(); count = r.ReadByte();
...@@ -6203,6 +6242,12 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6203,6 +6242,12 @@ public class Ocgcore : ServantWithCardDescription
case GameMessage.SelectTribute: case GameMessage.SelectTribute:
case GameMessage.SelectSum: case GameMessage.SelectSum:
m = new BinaryMaster(); m = new BinaryMaster();
if (currentMessage == GameMessage.SelectUnselectCard && cardsSelected.Count == 0)
{
m.writer.Write((Int32)(-1));
sendReturn(m.get());
break;
}
m.writer.Write((byte)(cardsMustBeSelected.Count + cardsSelected.Count)); m.writer.Write((byte)(cardsMustBeSelected.Count + cardsSelected.Count));
for (int i = 0; i < cardsMustBeSelected.Count; i++) for (int i = 0; i < cardsMustBeSelected.Count; i++)
{ {
...@@ -6216,7 +6261,6 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6216,7 +6261,6 @@ public class Ocgcore : ServantWithCardDescription
} }
sendReturn(m.get()); sendReturn(m.get());
break; break;
} }
} }
......
...@@ -95,7 +95,7 @@ public class Room : WindowServantSP ...@@ -95,7 +95,7 @@ public class Room : WindowServantSP
if (val != "") if (val != "")
{ {
TcpHelper.CtosMessage_Chat(val); TcpHelper.CtosMessage_Chat(val);
AddChatMsg(val, -1); //AddChatMsg(val, -1);
} }
} }
...@@ -506,13 +506,39 @@ public class Room : WindowServantSP ...@@ -506,13 +506,39 @@ public class Room : WindowServantSP
r.ReadByte(); r.ReadByte();
r.ReadByte(); r.ReadByte();
code = r.ReadInt32(); code = r.ReadInt32();
switch (code) int flag = code >> 28;
code = code & 0xFFFFFFF;
switch (flag)
{ {
case 1: case 1: // DECKERROR_LFLIST
RMSshow_onlyYes("", GameStringManager.get_unsafe(1406), null); RMSshow_onlyYes("", InterString.Get("卡组非法,请检查:[?]", YGOSharp.CardsManager.Get(code).Name) + "(数量不符合禁限卡表)", null);
break;
case 2: // DECKERROR_OCGONLY
RMSshow_onlyYes("", InterString.Get("卡组非法,请检查:[?]", YGOSharp.CardsManager.Get(code).Name) + "(OCG独有卡,不能在当前设置使用)", null);
break;
case 3: // DECKERROR_TCGONLY
RMSshow_onlyYes("", InterString.Get("卡组非法,请检查:[?]", YGOSharp.CardsManager.Get(code).Name) + "(TCG独有卡,不能在当前设置使用)", null);
break;
case 4: // DECKERROR_UNKNOWNCARD
if (code < 100000000)
RMSshow_onlyYes("", InterString.Get("卡组非法,请检查:[?]", YGOSharp.CardsManager.Get(code).Name) + "(服务器无法识别此卡,可能是服务器未更新)", null);
else
RMSshow_onlyYes("", InterString.Get("卡组非法,请检查:[?]", YGOSharp.CardsManager.Get(code).Name) + "(服务器无法识别此卡,可能是服务器不支持先行卡或此先行卡已正式更新)", null);
break;
case 5: // DECKERROR_CARDCOUNT
RMSshow_onlyYes("", InterString.Get("卡组非法,请检查:[?]", YGOSharp.CardsManager.Get(code).Name) + "(数量过多)", null);
break;
case 6: // DECKERROR_MAINCOUNT
RMSshow_onlyYes("", "主卡组数量应为40-60张", null);
break;
case 7: // DECKERROR_EXTRACOUNT
RMSshow_onlyYes("", "额外卡组数量应为0-15张", null);
break;
case 8: // DECKERROR_SIDECOUNT
RMSshow_onlyYes("", "副卡组数量应为0-15", null);
break; break;
default: default:
RMSshow_onlyYes("", InterString.Get("卡组非法,请检查:[?]", YGOSharp.CardsManager.Get(code).Name), null); RMSshow_onlyYes("", GameStringManager.get_unsafe(1406), null);
break; break;
} }
break; break;
......
...@@ -696,7 +696,10 @@ public class Servant ...@@ -696,7 +696,10 @@ public class Servant
cardPicLoader_.code = code; cardPicLoader_.code = code;
cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "atkPic_"); cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "atkPic_");
cardPicLoader_ = currentMSwindow.AddComponent<cardPicLoader>(); cardPicLoader_ = currentMSwindow.AddComponent<cardPicLoader>();
cardPicLoader_.code = code; if (Int32.Parse(def.value) != 8)
cardPicLoader_.code = code;
else
cardPicLoader_.code = 0;
cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "defPic_"); cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "defPic_");
} }
......
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
OverlayCard = 0x10000, OverlayCard = 0x10000,
Counters = 0x20000, Counters = 0x20000,
Owner = 0x40000, Owner = 0x40000,
IsDisabled = 0x80000, Status = 0x80000,
IsPublic = 0x100000,
LScale = 0x200000, LScale = 0x200000,
RScale = 0x400000 RScale = 0x400000
} }
......
...@@ -367,7 +367,7 @@ GameObject: ...@@ -367,7 +367,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!1 &171908 --- !u!1 &171908
GameObject: GameObject:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
...@@ -2200,17 +2200,17 @@ MonoBehaviour: ...@@ -2200,17 +2200,17 @@ MonoBehaviour:
updateAnchors: 1 updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1} mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4 mPivot: 4
mWidth: 196 mWidth: 200
mHeight: 27 mHeight: 27
mDepth: 7 mDepth: 7
autoResizeBoxCollider: 0 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 7.259259 aspectRatio: 7.4074073
keepCrispWhenShrunk: 1 keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 12800000, guid: f775853fdfd14bb47934543e95c3bae3, type: 3} mTrueTypeFont: {fileID: 12800000, guid: f775853fdfd14bb47934543e95c3bae3, type: 3}
mFont: {fileID: 0} mFont: {fileID: 0}
mText: YGOPro2 1.034.3 mText: "YGOPro2 233\u6D4B\u8BD5\u7248 v7"
mFontSize: 18 mFontSize: 18
mFontStyle: 0 mFontStyle: 0
mAlignment: 1 mAlignment: 1
...@@ -2764,7 +2764,19 @@ Prefab: ...@@ -2764,7 +2764,19 @@ Prefab:
m_Modifications: m_Modifications:
- target: {fileID: 0} - target: {fileID: 0}
propertyPath: mText propertyPath: mText
value: YGOPro2 1033.D.3 value: "YGOPro2 233\u6D4B\u8BD5\u7248 v7"
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: mWidth
value: 200
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: aspectRatio
value: 7.40740728
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_ParentPrefab: {fileID: 0} m_ParentPrefab: {fileID: 0}
......
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