feat: Adds TextDefinition serialization support. (#1217)

This commit is contained in:
Kamron Batman 2022-10-30 01:42:48 -07:00 • committed by GitHub
parent 39e6f62ec9
commit d791feb583
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 301 additions and 267 deletions

View file

@ -78,16 +78,9 @@ public abstract partial class PromotionalToken : Item
AddPage(0);
AddBackground(0, 0, 240, 135, 0x2422);
AddHtmlLocalized(
15,
15,
210,
75,
1070972,
0x0,
true
); // Click "OKAY" to redeem the following promotional item:
TextDefinition.AddHtmlText(this, 15, 60, 210, 75, m_Token.ItemGumpName, false, false);
// Click "OKAY" to redeem the following promotional item:
AddHtmlLocalized(15, 15, 210, 75, 1070972, 0x0, true);
m_Token.ItemGumpName.AddHtmlText(this, 15, 60, 210, 75, false, false);
AddButton(160, 95, 0xF7, 0xF8, 1); // Okay
AddButton(90, 95, 0xF2, 0xF1, 0); // Cancel
@ -113,7 +106,7 @@ public abstract partial class PromotionalToken : Item
if (i != null)
{
from.BankBox.AddItem(i);
TextDefinition.SendMessageTo(from, m_Token.ItemReceiveMessage);
m_Token.ItemReceiveMessage.SendMessageTo(from);
m_Token.Delete();
}
}