mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-04-25 08:04:27 -05:00
Show error 0x02 when attempting to retract a pokemon locked by someone else.
This commit is contained in:
parent
510a66d199
commit
e1de0fb39d
|
|
@ -237,14 +237,12 @@ namespace PkmnFoundations.GTS
|
|||
SessionManager.Remove(session);
|
||||
|
||||
GtsRecord4 record = Database.Instance.GtsDataForUser4(pokedex, pid);
|
||||
if (record == null || Database.Instance.GtsCheckLockStatus4(record.TradeId, pid))
|
||||
|
||||
if (record == null || // no pokemon in the system
|
||||
record.IsExchanged > 0 || // a traded pokemon is there, fail. Use delete.asp instead.
|
||||
!Database.Instance.GtsCheckLockStatus4(record.TradeId, pid)) // someone else is in the process of trading for this
|
||||
{
|
||||
response.Write(new byte[] { 0x00, 0x00 }, 0, 2);
|
||||
}
|
||||
else if (record.IsExchanged > 0)
|
||||
{
|
||||
// a traded pokemon is there, fail. Use delete.asp instead.
|
||||
response.Write(new byte[] { 0x00, 0x00 }, 0, 2);
|
||||
response.Write(new byte[] { 0x02, 0x00 }, 0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -257,7 +255,7 @@ namespace PkmnFoundations.GTS
|
|||
}
|
||||
else
|
||||
{
|
||||
response.Write(new byte[] { 0x00, 0x00 }, 0, 2);
|
||||
response.Write(new byte[] { 0x02, 0x00 }, 0, 2);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
|
|
|||
|
|
@ -180,14 +180,11 @@ namespace PkmnFoundations.GTS
|
|||
SessionManager.Remove(session);
|
||||
|
||||
GtsRecord5 record = Database.Instance.GtsDataForUser5(pokedex, pid);
|
||||
if (record == null || Database.Instance.GtsCheckLockStatus5(record.TradeId, pid))
|
||||
if (record == null || // no pokemon in the system
|
||||
record.IsExchanged > 0 || // a traded pokemon is there, fail. Use delete.asp instead.
|
||||
!Database.Instance.GtsCheckLockStatus5(record.TradeId, pid)) // someone else is in the process of trading for this
|
||||
{
|
||||
response.Write(new byte[] { 0x00, 0x00 }, 0, 2);
|
||||
}
|
||||
else if (record.IsExchanged > 0)
|
||||
{
|
||||
// a traded pokemon is there, fail. Use delete.asp instead.
|
||||
response.Write(new byte[] { 0x00, 0x00 }, 0, 2);
|
||||
response.Write(new byte[] { 0x02, 0x00 }, 0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -202,7 +199,7 @@ namespace PkmnFoundations.GTS
|
|||
}
|
||||
else
|
||||
{
|
||||
response.Write(new byte[] { 0x00, 0x00 }, 0, 2);
|
||||
response.Write(new byte[] { 0x02, 0x00 }, 0, 2);
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user