Skip to content

Commit f1bfa66

Browse files
AlexMacocianAlexandru Macocian
andcommitted
Fix for load build into game (Closes #1181) (#1190)
Co-authored-by: Alexandru Macocian <amacocian@microsoft.com>
1 parent a4485fc commit f1bfa66

File tree

2 files changed

+8
-145
lines changed

2 files changed

+8
-145
lines changed

Daybreak.API/Models/UIMessage.cs

Lines changed: 5 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -3,152 +3,14 @@
33
public enum UIMessage : uint
44
{
55
None = 0x0,
6-
Resize = 0x8,
76
InitFrame = 0x9,
87
DestroyFrame = 0xb,
98
KeyDown = 0x20, // wparam = UIPacket::kKeyAction*
109
KeyUp = 0x22, // wparam = UIPacket::kKeyAction*
11-
MouseClick = 0x22, // wparam = UIPacket::kMouseClick*
10+
MouseClick = 0x24, // wparam = UIPacket::kMouseClick*
1211
MouseClick2 = 0x31, // wparam = UIPacket::kMouseAction*
13-
MouseAction = 0x2f, // wparam = UIPacket::kMouseAction*
14-
SetLayout = 0x33,
15-
FrameMessage_0x47 = 0x55, // Multiple uses depending on frame
16-
UpdateAgentEffects = 0x10000000 | 0x9,
17-
RerenderAgentModel = 0x10000000 | 0x7, // wparam = uint32_t agent_id
18-
AgentSpeechBubble = 0x10000000 | 0x17,
19-
ShowAgentNameTag = 0x10000000 | 0x19, // wparam = AgentNameTagInfo*
20-
HideAgentNameTag = 0x10000000 | 0x1A,
21-
SetAgentNameTagAttribs = 0x10000000 | 0x1B, // wparam = AgentNameTagInfo*
22-
ChangeTarget = 0x10000000 | 0x20, // wparam = UIPacket::kChangeTarget*
23-
AgentStartCasting = 0x10000000 | 0x27, // wparam = UIPacket::kAgentStartCasting*
24-
ShowMapEntryMessage = 0x10000000 | 0x29, // wparam = { wchar_t* title, wchar_t* subtitle }
25-
SetCurrentPlayerData = 0x10000000 | 0x2A, // fired after setting the worldcontext player name
26-
PostProcessingEffect = 0x10000000 | 0x34, // Triggered when drunk. wparam = UIPacket::kPostProcessingEffect
27-
HeroAgentAdded = 0x10000000 | 0x38, // hero assigned to agent/inventory/ai mode
28-
HeroDataAdded = 0x10000000 | 0x39, // hero info received from server (name, level etc)
29-
ShowXunlaiChest = 0x10000000 | 0x40,
30-
MinionCountUpdated = 0x10000000 | 0x46,
31-
MoraleChange = 0x10000000 | 0x47, // wparam = {agent id, morale percent }
32-
LoginStateChanged = 0x10000000 | 0x50, // wparam = {bool is_logged_in, bool unk }
33-
EffectAdd = 0x10000000 | 0x55, // wparam = {agent_id, GW::Effect*}
34-
EffectRenew = 0x10000000 | 0x56, // wparam = GW::Effect*
35-
EffectRemove = 0x10000000 | 0x57, // wparam = effect id
36-
SkillActivated = 0x10000000 | 0x5b, // wparam ={ uint32_t agent_id , uint32_t skill_id }
37-
UpdateSkillbar = 0x10000000 | 0x5E, // wparam ={ uint32_t agent_id , ... }
38-
UpdateSkillsAvailable = 0x10000000 | 0x5f, // Triggered on a skill unlock, profession change or map load
39-
TitleProgressUpdated = 0x10000000 | 0x65, // wparam = title_id
40-
ExperienceGained = 0x10000000 | 0x66, // wparam = experience amount
41-
WriteToChatLog = 0x10000000 | 0x7E, // wparam = UIPacket::kWriteToChatLog*. Triggered by the game when it wants to add a new message to chat.
42-
WriteToChatLogWithSender = 0x10000000 | 0x7f, // wparam = UIPacket::kWriteToChatLogWithSender*. Triggered by the game when it wants to add a new message to chat.
43-
AllyOrGuildMessage = 0x10000000 | 0x80, // wparam = UIPacket::kAllyOrGuildMessage*
44-
PlayerChatMessage = 0x10000000 | 0x81, // wparam = UIPacket::kPlayerChatMessage*
45-
FloatingWindowMoved = 0x10000000 | 0x83, // wparam = frame_id
46-
FriendUpdated = 0x10000000 | 0x89, // wparam = { GW::Friend*, ... }
47-
MapLoaded = 0x10000000 | 0x8A,
48-
OpenWhisper = 0x10000000 | 0x90, // wparam = wchar* name
49-
Logout = 0x10000000 | 0x9b, // wparam = { bool unknown, bool character_select }
50-
CompassDraw = 0x10000000 | 0x9c, // wparam = UIPacket::kCompassDraw*
51-
OnScreenMessage = 0x10000000 | 0xA0, // wparam = wchar_** encoded_string
52-
DialogBody = 0x10000000 | 0xA4, // wparam = DialogBodyInfo*
53-
DialogButton = 0x10000000 | 0xA1, // wparam = DialogButtonInfo*
54-
TargetNPCPartyMember = 0x10000000 | 0xB1, // wparam = { uint32_t unk, uint32_t agent_id }
55-
TargetPlayerPartyMember = 0x10000000 | 0xB2, // wparam = { uint32_t unk, uint32_t player_number }
56-
VendorWindow = 0x10000000 | 0xB3, // wparam = UIPacket::kVendorWindow
57-
VendorItems = 0x10000000 | 0xB7, // wparam = UIPacket::kVendorItems
58-
VendorTransComplete = 0x10000000 | 0xB9, // wparam = *TransactionType
59-
VendorQuote = 0x10000000 | 0xBB, // wparam = UIPacket::kVendorQuote
60-
StartMapLoad = 0x10000000 | 0xC0, // wparam = { uint32_t map_id, ...}
61-
WorldMapUpdated = 0x10000000 | 0xC5, // Triggered when an area in the world map has been discovered/updated
62-
GuildMemberUpdated = 0x10000000 | 0xD8, // wparam = { GuildPlayer::name_ptr }
63-
ShowHint = 0x10000000 | 0xDF, // wparam = { uint32_t icon_type, wchar_t* message_enc }
64-
WeaponSetSwapComplete = 0x10000000 | 0xE7, // wparam = UIPacket::kWeaponSwap*
65-
WeaponSetSwapCancel = 0x10000000 | 0xE8,
66-
WeaponSetUpdated = 0x10000000 | 0xE9,
67-
UpdateGoldCharacter = 0x10000000 | 0xEA, // wparam = { uint32_t unk, uint32_t gold_character }
68-
UpdateGoldStorage = 0x10000000 | 0xEB, // wparam = { uint32_t unk, uint32_t gold_storage }
69-
InventorySlotUpdated = 0x10000000 | 0xEC, // undocumented. Triggered when an item is moved into a slot
70-
EquipmentSlotUpdated = 0x10000000 | 0xED, // undocumented. Triggered when an item is moved into a slot
71-
InventorySlotCleared = 0x10000000 | 0xEF, // undocumented. Triggered when an item has been removed from a slot
72-
EquipmentSlotCleared = 0x10000000 | 0xF0, // undocumented. Triggered when an item has been removed from a slot
73-
PvPWindowContent = 0x10000000 | 0xF8,
74-
PreStartSalvage = 0x10000000 | 0x100, // { uint32_t item_id, uint32_t kit_id }
75-
TradePlayerUpdated = 0x10000000 | 0x103, // wparam = GW::TraderPlayer*
76-
ItemUpdated = 0x10000000 | 0x104, // wparam = UIPacket::kItemUpdated*
77-
MapChange = 0x10000000 | 0x10F, // wparam = map id
78-
CalledTargetChange = 0x10000000 | 0x113, // wparam = { player_number, target_id }
79-
ErrorMessage = 0x10000000 | 0x117, // wparam = { int error_index, wchar_t* error_encoded_string }
80-
PartyHardModeChanged = 0x10000000 | 0x118, // wparam = { int is_hard_mode }
81-
PartyAddHenchman = 0x10000000 | 0x119,
82-
PartyRemoveHenchman = 0x10000000 | 0x11a,
83-
PartyAddHero = 0x10000000 | 0x11c,
84-
PartyRemoveHero = 0x10000000 | 0x11d,
85-
PartyAddPlayer = 0x10000000 | 0x122,
86-
PartyRemovePlayer = 0x10000000 | 0x124,
87-
DisableEnterMissionBtn = 0x10000000 | 0x128, // wparam = boolean (1 = disabled, 0 = enabled)
88-
ShowCancelEnterMissionBtn = 0x10000000 | 0x12b,
89-
PartyDefeated = 0x10000000 | 0x12d,
90-
PartySearchInviteReceived = 0x10000000 | 0x135, // wparam = UIPacket::kPartySearchInviteReceived*
91-
PartySearchInviteSent = 0x10000000 | 0x137,
92-
PartyShowConfirmDialog = 0x10000000 | 0x138, // wparam = UIPacket::kPartyShowConfirmDialog
93-
PreferenceEnumChanged = 0x10000000 | 0x13E, // wparam = UiPacket::kPreferenceEnumChanged
94-
PreferenceFlagChanged = 0x10000000 | 0x13F, // wparam = UiPacket::kPreferenceFlagChanged
95-
PreferenceValueChanged = 0x10000000 | 0x140, // wparam = UiPacket::kPreferenceValueChanged
96-
UIPositionChanged = 0x10000000 | 0x141, // wparam = UIPacket::kUIPositionChanged
97-
QuestAdded = 0x10000000 | 0x14C, // wparam = { quest_id, ... }
98-
QuestDetailsChanged = 0x10000000 | 0x14A, // wparam = { quest_id, ... }
99-
ClientActiveQuestChanged = 0x10000000 | 0x14C, // wparam = { quest_id, ... }. Triggered when the game requests the current quest to change
100-
ServerActiveQuestChanged = 0x10000000 | 0x14E, // wparam = UIPacket::kServerActiveQuestChanged*. Triggered when the server requests the current quest to change
101-
UnknownQuestRelated = 0x10000000 | 0x14F,
102-
DungeonComplete = 0x10000000 | 0x151, // undocumented
103-
MissionComplete = 0x10000000 | 0x152, // undocumented
104-
VanquishComplete = 0x10000000 | 0x154, // undocumented
105-
ObjectiveAdd = 0x10000000 | 0x155, // wparam = UIPacket::kObjectiveAdd*
106-
ObjectiveComplete = 0x10000000 | 0x156, // wparam = UIPacket::kObjectiveComplete*
107-
ObjectiveUpdated = 0x10000000 | 0x157, // wparam = UIPacket::kObjectiveUpdated*
108-
TradeSessionStart = 0x10000000 | 0x160, // wparam = { trade_state, player_number }
109-
TradeSessionUpdated = 0x10000000 | 0x166, // no args
110-
TriggerLogoutPrompt = 0x10000000 | 0x16C, // no args
111-
ToggleOptionsWindow = 0x10000000 | 0x16D, // no args
112-
CheckUIState = 0x10000000 | 0x170, // Undocumented
113-
RedrawItem = 0x10000000 | 0x172, // wparam = uint32_t item_id
114-
CloseSettings = 0x10000000 | 0x174, // Undocumented
115-
ChangeSettingsTab = 0x10000000 | 0x175, // wparam = uint32_t is_interface_tab
116-
GuildHall = 0x10000000 | 0x177, // wparam = gh key (uint32_t[4])
117-
LeaveGuildHall = 0x10000000 | 0x179,
118-
Travel = 0x10000000 | 0x17A,
119-
OpenWikiUrl = 0x10000000 | 0x17B, // wparam = char* url
120-
AppendMessageToChat = 0x10000000 | 0x189, // wparam = wchar_t* message
121-
HideHeroPanel = 0x10000000 | 0x197, // wparam = hero_id
122-
ShowHeroPanel = 0x10000000 | 0x198, // wparam = hero_id
123-
GetInventoryAgentId = 0x10000000 | 0x19c, // wparam = 0, lparam = uint32_t* agent_id_out. Used to fetch which agent is selected
124-
EquipItem = 0x10000000 | 0x19d, // wparam = { item_id, agent_id }
125-
MoveItem = 0x10000000 | 0x19e, // wparam = { item_id, to_bag, to_slot, bool prompt }
126-
InitiateTrade = 0x10000000 | 0x1A0,
127-
InventoryAgentChanged = 0x10000000 | 0x1b0, // Triggered when inventory needs updating due to agent change; no args
128-
OpenTemplate = 0x10000000 | 0x1B9, // wparam = GW::UI::ChatTemplate*
129-
130-
// GWCA Client to Server commands. Only added the ones that are used for hooks, everything else goes straight into GW
131-
132-
SendLoadSkillTemplate = 0x30000000 | 0x3, // wparam = SkillbarMgr::SkillTemplate*
133-
SendPingWeaponSet = 0x30000000 | 0x4, // wparam = UIPacket::kSendPingWeaponSet*
134-
SendMoveItem = 0x30000000 | 0x5, // wparam = UIPacket::kSendMoveItem*
135-
SendMerchantRequestQuote = 0x30000000 | 0x6, // wparam = UIPacket::kSendMerchantRequestQuote*
136-
SendMerchantTransactItem = 0x30000000 | 0x7, // wparam = UIPacket::kSendMerchantTransactItem*
137-
SendUseItem = 0x30000000 | 0x8, // wparam = UIPacket::kSendUseItem*
138-
SendSetActiveQuest = 0x30000000 | 0x9, // wparam = uint32_t quest_id
139-
SendAbandonQuest = 0x30000000 | 0xA, // wparam = uint32_t quest_id
140-
SendChangeTarget = 0x30000000 | 0xB, // wparam = UIPacket::kSendChangeTarget* // e.g. tell the gw client to focus on a different target
141-
SendCallTarget = 0x30000000 | 0x13, // wparam = { uint32_t call_type, uint32_t agent_id } // also used to broadcast morale, death penalty, "I'm following X", etc
142-
SendDialog = 0x30000000 | 0x16, // wparam = dialog_id // internal use
143-
144-
145-
StartWhisper = 0x30000000 | 0x17, // wparam = UIPacket::kStartWhisper*
146-
GetSenderColor = 0x30000000 | 0x18, // wparam = UIPacket::kGetColor* // Get chat sender color depending on channel, output object passed by reference
147-
GetMessageColor = 0x30000000 | 0x19, // wparam = UIPacket::kGetColor* // Get chat message color depending on channel, output object passed by reference
148-
SendChatMessage = 0x30000000 | 0x1B, // wparam = UIPacket::kSendChatMessage*
149-
LogChatMessage = 0x30000000 | 0x1D, // wparam = UIPacket::kLogChatMessage*. Triggered when a message wants to be added to the persistent chat log.
150-
RecvWhisper = 0x30000000 | 0x1E, // wparam = UIPacket::kRecvWhisper*
151-
PrintChatMessage = 0x30000000 | 0x1F, // wparam = UIPacket::kPrintChatMessage*. Triggered when a message wants to be added to the in-game chat window.
152-
SendWorldAction = 0x30000000 | 0x20, // wparam = UIPacket::kSendWorldAction*
153-
SetRendererValue = 0x30000000 | 0x21 // wparam = UIPacket::kSetRendererValue
12+
MouseAction = 0x32, // wparam = UIPacket::kMouseAction*
13+
WriteToChatLog = 0x10000000 | 0x7F, // wparam = UIPacket::kWriteToChatLog*. Triggered by the game when it wants to add a new message to chat.
14+
WriteToChatLogWithSender = 0x10000000 | 0x80, // wparam = UIPacket::kWriteToChatLogWithSender*. Triggered by the game when it wants to add a new message to chat.
15+
Logout = 0x10000000 | 0x9D, // wparam = { bool unknown, bool character_select }
15416
};

Daybreak/Views/LaunchView.razor.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using Microsoft.Extensions.Options;
1212
using System.Collections.ObjectModel;
1313
using System.ComponentModel;
14+
using System.Configuration;
1415
using System.Core.Extensions;
1516
using System.Diagnostics;
1617
using System.Runtime.CompilerServices;
@@ -25,7 +26,7 @@ public sealed class LaunchViewModel(
2526
ILaunchConfigurationService launchConfigurationService,
2627
IOnboardingService onboardingService,
2728
IApplicationLauncher applicationLauncher,
28-
IOptions<FocusViewOptions> focusViewOptions) : ViewModelBase<LaunchViewModel, LaunchView>, INotifyPropertyChanged, IDisposable
29+
ILiveOptions<FocusViewOptions> focusViewOptions) : ViewModelBase<LaunchViewModel, LaunchView>, INotifyPropertyChanged, IDisposable
2930
{
3031
private static readonly TimeSpan LaunchTimeout = TimeSpan.FromSeconds(10);
3132

@@ -35,7 +36,7 @@ public sealed class LaunchViewModel(
3536
private readonly ILaunchConfigurationService launchConfigurationService = launchConfigurationService.ThrowIfNull();
3637
private readonly IOnboardingService onboardingService = onboardingService.ThrowIfNull();
3738
private readonly IApplicationLauncher applicationLauncher = applicationLauncher.ThrowIfNull();
38-
private readonly IOptions<FocusViewOptions> focusViewOptions = focusViewOptions.ThrowIfNull();
39+
private readonly ILiveOptions<FocusViewOptions> focusViewOptions = focusViewOptions.ThrowIfNull();
3940

4041
private CancellationTokenSource? cancellationTokenSource;
4142

0 commit comments

Comments
 (0)