Add Action buttons to Account/Character menu
This commit is contained in:
@ -73,7 +73,10 @@
|
||||
<h6>@character.Name</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">Card action buttons could go here!</p>
|
||||
<a class="btn active" href="/Account?handler=CharacterAction&guid=@character.guid&action=1">Rename Character</a>
|
||||
<a class="btn active" href="/Account?handler=CharacterAction&guid=@character.guid&action=8">Recustomize Character</a>
|
||||
<a class="btn active" href="/Account?handler=CharacterAction&guid=@character.guid&action=64">Change Faction</a>
|
||||
<a class="btn active" href="/Account?handler=CharacterAction&guid=@character.guid&action=128">Change Race</a>
|
||||
</div>
|
||||
<div class="card-footer text-muted">
|
||||
<p>Level @character.Level @character.GetRace() @character.GetClass()</p>
|
||||
|
||||
@ -50,6 +50,16 @@ namespace NightmareCoreWeb2.Pages
|
||||
ViewData["Title"] = a.Username;
|
||||
CharacterListType = $"{a.Username}'s Characters";
|
||||
}
|
||||
public void OnGetCharacterAction(int guid, int action)
|
||||
{
|
||||
Character c = new Character(guid, conn);
|
||||
if ((c.AtLogin & Character.AtLoginOptions.AT_LOGIN_FIRST) == 0)
|
||||
{
|
||||
c.AtLogin |= (Character.AtLoginOptions)action;
|
||||
}
|
||||
c.SetAtLogin(conn);
|
||||
|
||||
}
|
||||
public void OnGet()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user