mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-10-01 05:36:56 -05:00
Show offerer pid in admin view
This commit is contained in:
@@ -124,6 +124,11 @@
|
||||
<td class="pfFormValue"><asp:Literal ID="litHaxCheck" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pfFormPair">
|
||||
<th class="pfFormKey">Offerer pid</th>
|
||||
<td class="pfFormValue"><asp:Literal ID="litOffererPid" runat="server" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace PkmnFoundations.Web.gts
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
Pokedex.Pokedex pokedex = AppStateHelper.Pokedex(Application);
|
||||
GtsRecordBase record = null;
|
||||
PokemonPartyBase pkmn = null;
|
||||
|
||||
if (Request.QueryString.Count == 0 || Request.QueryString.Count > 2) throw new WebException(400);
|
||||
@@ -60,14 +61,14 @@ namespace PkmnFoundations.Web.gts
|
||||
{
|
||||
case "4":
|
||||
{
|
||||
GtsRecord4 record = Database.Instance.GtsGetRecord4(pokedex, tradeId, isExchanged, true);
|
||||
if (record != null) pkmn = new PokemonParty4(pokedex, record.Data.ToArray());
|
||||
record = Database.Instance.GtsGetRecord4(pokedex, tradeId, isExchanged, true);
|
||||
if (record != null) pkmn = record.Pokemon;
|
||||
|
||||
} break;
|
||||
case "5":
|
||||
{
|
||||
GtsRecord5 record = Database.Instance.GtsGetRecord5(pokedex, tradeId, isExchanged, true);
|
||||
if (record != null) pkmn = new PokemonParty5(pokedex, record.Data.ToArray());
|
||||
record = Database.Instance.GtsGetRecord5(pokedex, tradeId, isExchanged, true);
|
||||
if (record != null) pkmn = record.Pokemon;
|
||||
|
||||
} break;
|
||||
default:
|
||||
@@ -84,11 +85,13 @@ namespace PkmnFoundations.Web.gts
|
||||
if (pkmn == null)
|
||||
throw new WebException(403);
|
||||
|
||||
Bind(pkmn);
|
||||
Bind(record);
|
||||
}
|
||||
|
||||
private void Bind(PokemonPartyBase pkmn)
|
||||
private void Bind(GtsRecordBase record)
|
||||
{
|
||||
PokemonPartyBase pkmn = record.Pokemon;
|
||||
|
||||
litNickname.Text = pkmn.Nickname;
|
||||
bool shiny = pkmn.IsShiny;
|
||||
imgPokemon.ImageUrl = WebFormat.PokemonImageLarge(pkmn);
|
||||
@@ -140,6 +143,7 @@ namespace PkmnFoundations.Web.gts
|
||||
litAbility.Text = pkmn.Ability == null ? "" : pkmn.Ability.Name.ToString();
|
||||
litVersion.Text = pkmn.Version.ToString();
|
||||
litHaxCheck.Text = pkmn.Validate().IsValid ? "Pass" : "Fail";
|
||||
litOffererPid.Text = record.PID.ToString();
|
||||
|
||||
// xxx: loop
|
||||
litHpCurr.Text = pkmn.HP.ToString();
|
||||
|
||||
9
web/gts/Pokemon.aspx.designer.cs
generated
9
web/gts/Pokemon.aspx.designer.cs
generated
@@ -257,6 +257,15 @@ namespace PkmnFoundations.Web.gts
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal litHaxCheck;
|
||||
|
||||
/// <summary>
|
||||
/// litOffererPid control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Literal litOffererPid;
|
||||
|
||||
/// <summary>
|
||||
/// litHpIv control.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user