public override void OnResponse(RelayInfo info) { if (info.ButtonID >= 100) { int id = info.ButtonID - 100; if (id >= 0 && id < Skills.Length) { Selection = Skills[id]; SendGump(new GenericConfirmCallbackGump <ApplySkillBonusGump>(User, User.Skills[Selection].Info.Name, 1155611, this, null, (m, gump) => { if (gump.Item.IsChildOf(gump.User.Backpack) || gump.User.Items.Contains(gump.Item)) { gump.User.SendLocalizedMessage(1155612); // A skill bonus has been applied to the item! Bonuses.SetValues(gump.Index, gump.Selection, gump.Value); gump.Item.InvalidateProperties(); } }, (m, gump) => { gump.Refresh(); })); } } }
public override void OnResponse(RelayInfo info) { if (info.ButtonID >= 100) { int id = info.ButtonID - 100; if (id >= 0 && id < Skills.Length) { Selection = Skills[id]; if (Core.TOL) // ERA MAY NEED ADJUSTED FOR CLILOC { SendGump(new GenericConfirmCallbackGump <ApplySkillBonusGump>(User, User.Skills[Selection].Info.Name, 1155611, this, null, (m, gump) => { if (gump.Item.IsChildOf(gump.User.Backpack) || gump.User.Items.Contains(gump.Item)) { gump.User.SendLocalizedMessage(1155612); // A skill bonus has been applied to the item! Bonuses.SetValues(gump.Index, gump.Selection, gump.Value); gump.Item.InvalidateProperties(); } }, (m, gump) => { gump.Refresh(); })); } else { TextDefinition text; if (Item is BaseWeapon) { text = 1155611; // Are you sure you wish to apply the selected skill bonus to this weapon? } else { text = 1155611; // Are you sure you wish to apply the selected skill bonus to this item? } SendGump(new GenericConfirmCallbackGump <ApplySkillBonusGump>(User, User.Skills[Selection].Info.Name, text, this, null, (m, gump) => { if (gump.Item.IsChildOf(gump.User.Backpack) || gump.User.Items.Contains(gump.Item)) { gump.User.SendLocalizedMessage(1155612); // A skill bonus has been applied to the item! Bonuses.SetValues(gump.Index, gump.Selection, gump.Value); gump.Item.InvalidateProperties(); } }, (m, gump) => { gump.Refresh(); })); } } } }