mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-09-30 13:16:36 -05:00
Removed some redundant asserts/casts.
This commit is contained in:
@@ -192,7 +192,7 @@ namespace PkmnFoundations.GTS
|
||||
{
|
||||
// No pokemon in the system
|
||||
// what do here?
|
||||
ShowError(context, 400);
|
||||
ShowError(context, 403);
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -502,11 +502,9 @@ namespace PkmnFoundations.GTS
|
||||
AssertHelper.Assert(prevSession.Tag is GtsRecord4[]);
|
||||
GtsRecord4[] tag = (GtsRecord4[])prevSession.Tag;
|
||||
AssertHelper.Assert(tag.Length == 2);
|
||||
AssertHelper.Assert(tag[0] is GtsRecord4);
|
||||
AssertHelper.Assert(tag[0] is GtsRecord4);
|
||||
|
||||
GtsRecord4 upload = (GtsRecord4)tag[0];
|
||||
GtsRecord4 result = (GtsRecord4)tag[1];
|
||||
GtsRecord4 upload = tag[0];
|
||||
GtsRecord4 result = tag[1];
|
||||
|
||||
if (Database.Instance.GtsTradePokemon4(upload, result, pid))
|
||||
response.Write(new byte[] { 0x01, 0x00 }, 0, 2);
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace PkmnFoundations.GTS
|
||||
// todo: we should probably repeat the previous record
|
||||
// that was in here before delete.asp was called.
|
||||
// That is... if we still had it. -__-;
|
||||
ShowError(context, 400);
|
||||
ShowError(context, 403);
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -457,8 +457,8 @@ namespace PkmnFoundations.GTS
|
||||
GtsRecord5[] tag = (GtsRecord5[])prevSession.Tag;
|
||||
AssertHelper.Assert(tag.Length == 2);
|
||||
|
||||
GtsRecord5 upload = (GtsRecord5)tag[0];
|
||||
GtsRecord5 result = (GtsRecord5)tag[1];
|
||||
GtsRecord5 upload = tag[0];
|
||||
GtsRecord5 result = tag[1];
|
||||
|
||||
if (Database.Instance.GtsTradePokemon5(upload, result, pid))
|
||||
response.Write(new byte[] { 0x01, 0x00 }, 0, 2);
|
||||
|
||||
Reference in New Issue
Block a user