Skip to content

Commit afbc851

Browse files
committed
Create QuestAreaCodeType values -- kmst
1 parent 542e1ee commit afbc851

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*Copyright(c) 2024, LastBattle https://github.com/lastbattle/Harepacker-resurrected
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.
20+
*/
21+
22+
using System;
23+
24+
namespace MapleLib.WzLib.WzStructure.Data.QuestStructure
25+
{
26+
public enum QuestAreaCodeType
27+
{
28+
Unknown = 0,
29+
CrossHunter = 0x1,
30+
Maple_Island = 0x14,
31+
Event = 0x32,
32+
Event_Mission = 0x34, // anything below here is not used before v12x post big-bang update
33+
Boardgame = 0x36,
34+
EvolvingSystem = 0x20,
35+
DailySpecial = 0x59,
36+
Friends = 0x5D,
37+
StarPlanet = 0x62,
38+
StarPlanet_Quest = 0x63,
39+
Completed_Before_BigBang = 0x64,
40+
StarPlanet_Guide = 0x65,
41+
Blockbuster = 0x66,
42+
HOFM = 0xC9,
43+
Tutorial_And_Job = 0x2328,
44+
}
45+
46+
public static class QuestAreaCodeTypeExt
47+
{
48+
/// <summary>
49+
/// Human readable string
50+
/// </summary>
51+
/// <param name="state"></param>
52+
/// <returns></returns>
53+
public static string ToReadableString(this QuestAreaCodeType state)
54+
{
55+
return state.ToString().Replace("_", " ");
56+
}
57+
58+
/// <summary>
59+
/// Converts from the string back to enum
60+
/// </summary>
61+
/// <param name="name"></param>
62+
/// <returns></returns>
63+
public static QuestAreaCodeType ToEnum(this string name)
64+
{
65+
// Try to parse the string to enum
66+
if (Enum.TryParse<QuestAreaCodeType>(name.Replace(" ", "_"), out QuestAreaCodeType result))
67+
{
68+
return (QuestAreaCodeType)result;
69+
}
70+
return QuestAreaCodeType.Unknown;
71+
}
72+
}
73+
}
74+
75+
/* KMST1029
76+
* 457
77+
enum $CD8523FFACD4BE0C585B1BFB07FFF800
78+
{
79+
QUEST_CATEGORY_CROSSHUNTER = 0x1,
80+
QUEST_CATEGORY_MAPLE_ISLAND = 0x14,
81+
QUEST_CATEGORY_EVENT = 0x32,
82+
QUEST_CATEGORY_EVENT_MISSION = 0x34,
83+
QUEST_CATEGORY_BOARDGAME = 0x36,
84+
QUEST_CATEGORY_EVOLVINGSYSTEM = 0x20,
85+
QUEST_CATEGORY_DAILYSPECIAL = 0x59,
86+
QUEST_CATEGORY_FRIENDS = 0x5D,
87+
QUEST_CATEGORY_STARPLANET = 0x62,
88+
QUEST_CATEGORY_STARPLANET_QUEST = 0x63,
89+
QUEST_CATEGORY_COMPLETED_BEFORE_BIGBANG = 0x64,
90+
QUEST_CATEGORY_STARPLANET_GUIDE = 0x65,
91+
QUEST_CATEGORY_BLOCKBUSTER = 0x66,
92+
QUEST_CATEGORY_HOFM = 0xC9,
93+
QUEST_CATEGORY_TUTORIAL_AND_JOB = 0x2328,
94+
};*/

0 commit comments

Comments
 (0)