diff --git a/Source/msg.cpp b/Source/msg.cpp index 84673f4fb..d04ba6da4 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -2276,7 +2276,7 @@ void NetSendCmdParam3(bool bHiPri, _cmd_id bCmd, uint16_t wParam1, uint16_t wPar NetSendLoPri(MyPlayerId, (byte *)&cmd, sizeof(cmd)); } -void NetSendCmdQuest(bool bHiPri, const QuestStruct &quest) +void NetSendCmdQuest(bool bHiPri, const Quest &quest) { TCmdQuest cmd; cmd.bCmd = CMD_SYNCQUEST; diff --git a/Source/msg.h b/Source/msg.h index 6fa072837..805649a5d 100644 --- a/Source/msg.h +++ b/Source/msg.h @@ -428,7 +428,7 @@ void NetSendCmdLocParam3(bool bHiPri, _cmd_id bCmd, Point position, uint16_t wPa void NetSendCmdParam1(bool bHiPri, _cmd_id bCmd, uint16_t wParam1); void NetSendCmdParam2(bool bHiPri, _cmd_id bCmd, uint16_t wParam1, uint16_t wParam2); void NetSendCmdParam3(bool bHiPri, _cmd_id bCmd, uint16_t wParam1, uint16_t wParam2, uint16_t wParam3); -void NetSendCmdQuest(bool bHiPri, const QuestStruct &quest); +void NetSendCmdQuest(bool bHiPri, const Quest &quest); void NetSendCmdGItem(bool bHiPri, _cmd_id bCmd, BYTE mast, BYTE pnum, BYTE ii); void NetSendCmdPItem(bool bHiPri, _cmd_id bCmd, Point position); void NetSendCmdChItem(bool bHiPri, BYTE bLoc); diff --git a/Source/quests.cpp b/Source/quests.cpp index c05a64f06..41a445623 100644 --- a/Source/quests.cpp +++ b/Source/quests.cpp @@ -29,7 +29,7 @@ namespace devilution { bool QuestLogIsOpen; std::optional pQLogCel; /** Contains the quests of the current game. */ -QuestStruct Quests[MAXQUESTS]; +Quest Quests[MAXQUESTS]; int ReturnLvlX; int ReturnLvlY; dungeon_type ReturnLevelType; @@ -346,7 +346,7 @@ void InitQuests() Quests[Q_BETRAYER]._qvar1 = 2; } -void InitialiseQuestPools(uint32_t seed, QuestStruct quests[]) +void InitialiseQuestPools(uint32_t seed, Quest quests[]) { SetRndSeed(seed); if (GenerateRnd(2) != 0) @@ -871,7 +871,7 @@ void SetMultiQuest(int q, quest_state s, bool log, int v1) } } -bool QuestStruct::IsAvailable() +bool Quest::IsAvailable() { if (setlevel) return false; diff --git a/Source/quests.h b/Source/quests.h index b9db99791..fe1c9a788 100644 --- a/Source/quests.h +++ b/Source/quests.h @@ -44,7 +44,7 @@ enum quest_state : uint8_t { QUEST_INVALID = 0xFF, }; -struct QuestStruct { +struct Quest { quest_id _qidx; quest_state _qactive; uint8_t _qlevel; @@ -73,7 +73,7 @@ struct QuestDataStruct { extern bool QuestLogIsOpen; extern std::optional pQLogCel; -extern QuestStruct Quests[MAXQUESTS]; +extern Quest Quests[MAXQUESTS]; extern int ReturnLvlX; extern int ReturnLvlY; extern dungeon_type ReturnLevelType; @@ -86,7 +86,7 @@ void InitQuests(); * @param seed The seed used to control which quests are deactivated * @param quests The available quest list, this function will make some of them inactive by the time it returns */ -void InitialiseQuestPools(uint32_t seed, QuestStruct quests[]); +void InitialiseQuestPools(uint32_t seed, Quest quests[]); void CheckQuests(); bool ForceQuests(); void CheckQuestKill(const Monster &monster, bool sendmsg);