-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Cleans up HonorGump and Honor checks (#1853)
### Summary - Moves `HonorSelf` gump to the Virtues folder. - Renames `HonorSelf` to `HonorSelfGump` - Makes `HonorSelfGump` a static gump. - Changes the text in the gump to a cliloc. - Collapses some of the checks for honoring to simplify the logic. - Moves the player check higher to fix the wrong error message displaying when trying to honor damaged players.
- Loading branch information
1 parent
ac3e4fc
commit 8b1014f
Showing
3 changed files
with
41 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Server.Engines.Virtues; | ||
using Server.Mobiles; | ||
using Server.Network; | ||
|
||
namespace Server.Gumps; | ||
|
||
public class HonorSelfGump : StaticGump<HonorSelfGump> | ||
{ | ||
private readonly PlayerMobile _from; | ||
|
||
public HonorSelfGump(PlayerMobile from) : base(150, 50) => _from = from; | ||
|
||
protected override void BuildLayout(ref StaticGumpBuilder builder) | ||
{ | ||
builder.AddBackground(0, 0, 245, 145, 9250); | ||
builder.AddButton(157, 101, 247, 248, 1); | ||
builder.AddButton(81, 100, 241, 248, 0); | ||
|
||
// Are you sure you want to use honor points on yourself? | ||
builder.AddHtmlLocalized(21, 20, 203, 70, 1071218, true); | ||
} | ||
|
||
public override void OnResponse(NetState sender, in RelayInfo info) | ||
{ | ||
if (info.ButtonID == 1) | ||
{ | ||
HonorVirtue.ActivateEmbrace(_from); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.