Commit bf8fc0fa authored by mercury233's avatar mercury233

add OnSelectPlace field zone basic support

parent ef961874
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
z5 = 0x20, z5 = 0x20,
z6 = 0x40, z6 = 0x40,
FieldZone = 0x20,
MonsterZones = 0x7f, MonsterZones = 0x7f,
MainMonsterZones = 0x1f, MainMonsterZones = 0x1f,
ExtraMonsterZones = 0x60, ExtraMonsterZones = 0x60,
......
...@@ -1283,6 +1283,12 @@ namespace WindBot.Game ...@@ -1283,6 +1283,12 @@ namespace WindBot.Game
location = CardLocation.SpellZone; location = CardLocation.SpellZone;
filter = (field >> 8) & Zones.SpellZones; filter = (field >> 8) & Zones.SpellZones;
} }
else if ((field & 0x2000) != 0)
{
player = 0;
location = CardLocation.FieldZone;
filter = Zones.FieldZone;
}
else if ((field & 0xc000) != 0) else if ((field & 0xc000) != 0)
{ {
player = 0; player = 0;
...@@ -1301,6 +1307,12 @@ namespace WindBot.Game ...@@ -1301,6 +1307,12 @@ namespace WindBot.Game
location = CardLocation.SpellZone; location = CardLocation.SpellZone;
filter = (field >> 24) & Zones.SpellZones; filter = (field >> 24) & Zones.SpellZones;
} }
else if ((field & 0x20000000) != 0)
{
player = 1;
location = CardLocation.FieldZone;
filter = Zones.FieldZone;
}
else else
{ {
player = 1; player = 1;
...@@ -1314,7 +1326,7 @@ namespace WindBot.Game ...@@ -1314,7 +1326,7 @@ namespace WindBot.Game
byte[] resp = new byte[3]; byte[] resp = new byte[3];
resp[0] = (byte)GetLocalPlayer(player); resp[0] = (byte)GetLocalPlayer(player);
if (location != CardLocation.PendulumZone) if (location != CardLocation.PendulumZone && location != CardLocation.FieldZone)
{ {
resp[1] = (byte)location; resp[1] = (byte)location;
if ((selected & filter) > 0) if ((selected & filter) > 0)
...@@ -1334,8 +1346,9 @@ namespace WindBot.Game ...@@ -1334,8 +1346,9 @@ namespace WindBot.Game
if ((selected & filter) > 0) if ((selected & filter) > 0)
filter &= selected; filter &= selected;
if ((filter & Zones.z0) != 0) resp[2] = 6; if ((filter & Zones.FieldZone) != 0) resp[2] = 5;
if ((filter & Zones.z1) != 0) resp[2] = 7; if ((filter & Zones.z0) != 0) resp[2] = 6; // left pendulum zone
if ((filter & Zones.z1) != 0) resp[2] = 7; // right pendulum zone
} }
BinaryWriter reply = GamePacketFactory.Create(CtosMessage.Response); BinaryWriter reply = GamePacketFactory.Create(CtosMessage.Response);
......
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