归档
This commit is contained in:
parent
01aba9447e
commit
9f0feddcbb
BIN
.vs/MH2QuestEditor/DesignTimeBuild/.dtbcache.v2
Normal file
BIN
.vs/MH2QuestEditor/DesignTimeBuild/.dtbcache.v2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
.vs/MH2QuestEditor/FileContentIndex/read.lock
Normal file
0
.vs/MH2QuestEditor/FileContentIndex/read.lock
Normal file
1021
.vs/MH2QuestEditor/config/applicationhost.config
Normal file
1021
.vs/MH2QuestEditor/config/applicationhost.config
Normal file
File diff suppressed because it is too large
Load Diff
BIN
.vs/MH2QuestEditor/v17/.futdcache.v2
Normal file
BIN
.vs/MH2QuestEditor/v17/.futdcache.v2
Normal file
Binary file not shown.
BIN
.vs/MH2QuestEditor/v17/.suo
Normal file
BIN
.vs/MH2QuestEditor/v17/.suo
Normal file
Binary file not shown.
BIN
.vs/ProjectEvaluation/mh2questeditor.metadata.v5.2
Normal file
BIN
.vs/ProjectEvaluation/mh2questeditor.metadata.v5.2
Normal file
Binary file not shown.
BIN
.vs/ProjectEvaluation/mh2questeditor.projects.v5.2
Normal file
BIN
.vs/ProjectEvaluation/mh2questeditor.projects.v5.2
Normal file
Binary file not shown.
17939
Data_list.cs
Normal file
17939
Data_list.cs
Normal file
File diff suppressed because it is too large
Load Diff
6998
Editor.Designer.cs
generated
Normal file
6998
Editor.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
69
Editor.resx
Normal file
69
Editor.resx
Normal file
@ -0,0 +1,69 @@
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>157, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>25</value>
|
||||
</metadata>
|
||||
</root>
|
9
MH2QuestEditor.csproj
Normal file
9
MH2QuestEditor.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
9
MH2QuestEditor.csproj.user
Normal file
9
MH2QuestEditor.csproj.user
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Compile Update="Editor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
31
MH2QuestEditor.sln
Normal file
31
MH2QuestEditor.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33403.182
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MH2QuestEditor", "MH2QuestEditor.csproj", "{39B7B989-DE1D-4C28-8378-448796210303}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MHQuestHelperLib", "MHQuestHelperLib\MHQuestHelperLib.csproj", "{AC9E1E4A-4073-4A9C-B8EB-6C5B4FC7EFD4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{39B7B989-DE1D-4C28-8378-448796210303}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{39B7B989-DE1D-4C28-8378-448796210303}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{39B7B989-DE1D-4C28-8378-448796210303}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{39B7B989-DE1D-4C28-8378-448796210303}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AC9E1E4A-4073-4A9C-B8EB-6C5B4FC7EFD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AC9E1E4A-4073-4A9C-B8EB-6C5B4FC7EFD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AC9E1E4A-4073-4A9C-B8EB-6C5B4FC7EFD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AC9E1E4A-4073-4A9C-B8EB-6C5B4FC7EFD4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {4A160B23-92D0-4B01-A60A-4B6B6EA83DD1}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
230
MHQuestHelperLib/HexHelper.cs
Normal file
230
MHQuestHelperLib/HexHelper.cs
Normal file
@ -0,0 +1,230 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MHQuestHelperLib
|
||||
{
|
||||
public class HexHelper
|
||||
{
|
||||
|
||||
public static byte[] CopyByteArr(byte[] src)
|
||||
{
|
||||
byte[] target = new byte[src.Length];
|
||||
//加载数据
|
||||
target = new byte[src.Length];
|
||||
for (int i = 0; i < src.Length; i++)
|
||||
target[i] = src[i];
|
||||
return target;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取byte[]数据
|
||||
/// </summary>
|
||||
/// <param name="src"></param>
|
||||
/// <param name="lenght"></param>
|
||||
/// <param name="offset"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] ReadBytes(byte[] src, int lenght, int offset = 0)
|
||||
{
|
||||
byte[] data = new byte[lenght];
|
||||
for (int i = 0; i < lenght; i++)
|
||||
{
|
||||
data[i] = src[offset + i];
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* byte[]转换int byte高位在前
|
||||
*/
|
||||
public static int bytesToInt(byte[] src,int lenght, int offset = 0)
|
||||
{
|
||||
if (lenght == 1)
|
||||
return src[offset + 0];
|
||||
|
||||
byte[] data = new byte[lenght];
|
||||
for (int i = 0; i < lenght; i++)
|
||||
{
|
||||
data[i] = src[offset + i];
|
||||
}
|
||||
|
||||
if(lenght == 2)
|
||||
return BitConverter.ToInt16(data, 0);
|
||||
else //if (lenght == 4)
|
||||
return BitConverter.ToInt32(data, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* byte[]转换int byte高位在前
|
||||
*/
|
||||
public static uint bytesToUInt(byte[] src, int lenght, int offset = 0)
|
||||
{
|
||||
if (lenght == 1)
|
||||
return src[offset + 0];
|
||||
|
||||
byte[] data = new byte[lenght];
|
||||
for (int i = 0; i < lenght; i++)
|
||||
{
|
||||
data[i] = src[offset + i];
|
||||
}
|
||||
|
||||
if (lenght == 2)
|
||||
return BitConverter.ToUInt16(data, 0);
|
||||
else //if (lenght == 4)
|
||||
return BitConverter.ToUInt32(data, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* int 转 byte[] byte高位在前
|
||||
*/
|
||||
public static byte[] intToBytes(int value)
|
||||
{
|
||||
return BitConverter.GetBytes(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从字节读取字符串
|
||||
*/
|
||||
public static string ReadBytesToString(byte[] src, int Start, Encoding encoding = null)
|
||||
{
|
||||
List<byte> bytes = new List<byte>();
|
||||
|
||||
int index = 0;
|
||||
while (true)
|
||||
{
|
||||
bytes.Add(src[Start + index]);
|
||||
|
||||
if (src[Start + index + 1] == 0x00)
|
||||
break;
|
||||
|
||||
index++;
|
||||
}
|
||||
if (encoding == null)
|
||||
encoding = Encoding.GetEncoding("Shift-JIS");
|
||||
string str = encoding.GetString(bytes.ToArray());
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 从字节读取字符串
|
||||
*/
|
||||
public static string ReadBytesToString(byte[] src, Encoding encoding = null)
|
||||
{
|
||||
if (encoding == null)
|
||||
encoding = Encoding.GetEncoding("Shift-JIS");
|
||||
string str = encoding.GetString(src.ToArray());
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 写入int到byte[] byte高位在前
|
||||
*/
|
||||
public static void ModifyIntHexToBytes(byte[] srcdata, int targetvalue,int startoffset, int srclenght)
|
||||
{
|
||||
byte[] targetVal = intToBytes(targetvalue);
|
||||
|
||||
//抹去数据
|
||||
for (int i = 0; i < srclenght; i++)
|
||||
srcdata[startoffset + i] = 0x00;
|
||||
|
||||
for (int i = 0; i < targetVal.Length && i < srclenght; i++)
|
||||
srcdata[startoffset + i] = targetVal[i];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 写入byte[]到byte[] byte高位在前
|
||||
*/
|
||||
public static void ModifyDataToBytes(byte[] srcdata, byte[] targetVal, int startoffset)
|
||||
{
|
||||
//抹去数据
|
||||
for (int i = 0; i < targetVal.Length; i++)
|
||||
srcdata[startoffset + i] = 0x00;
|
||||
|
||||
for (int i = 0; i < targetVal.Length && i < targetVal.Length; i++)
|
||||
srcdata[startoffset + i] = targetVal[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* 对比数据
|
||||
*/
|
||||
public static bool CheckDataEquals(byte[] srcdata, byte[] targetVal, int startoffset)
|
||||
{
|
||||
byte[] temp = new byte[targetVal.Length];
|
||||
for (int i = 0; i < targetVal.Length && i < targetVal.Length; i++)
|
||||
temp[i] = srcdata[startoffset + i];
|
||||
|
||||
return Array.Equals(targetVal, temp);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 另一种16进制转10进制的处理方式,Multiplier参与*16的循环很巧妙,对Multiplier的处理很推荐,逻辑统一
|
||||
/// </summary>
|
||||
/// <param name="HexaDecimalString"></param>
|
||||
/// <returns></returns>
|
||||
public static int HexaToDecimal(string HexaDecimalString)
|
||||
{
|
||||
int Decimal = 0;
|
||||
int Multiplier = 1;
|
||||
|
||||
for (int i = HexaDecimalString.Length - 1; i >= 0; i--)
|
||||
{
|
||||
Decimal += HexaToDecimal(HexaDecimalString[i]) * Multiplier;
|
||||
Multiplier *= 16;
|
||||
}
|
||||
return Decimal;
|
||||
}
|
||||
|
||||
static int HexaToDecimal(char c)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '0':
|
||||
return 0;
|
||||
case '1':
|
||||
return 1;
|
||||
case '2':
|
||||
return 2;
|
||||
case '3':
|
||||
return 3;
|
||||
case '4':
|
||||
return 4;
|
||||
case '5':
|
||||
return 5;
|
||||
case '6':
|
||||
return 6;
|
||||
case '7':
|
||||
return 7;
|
||||
case '8':
|
||||
return 8;
|
||||
case '9':
|
||||
return 9;
|
||||
case 'A':
|
||||
case 'a':
|
||||
return 10;
|
||||
case 'B':
|
||||
case 'b':
|
||||
return 11;
|
||||
case 'C':
|
||||
case 'c':
|
||||
return 12;
|
||||
case 'D':
|
||||
case 'd':
|
||||
return 13;
|
||||
case 'E':
|
||||
case 'e':
|
||||
return 14;
|
||||
case 'F':
|
||||
case 'f':
|
||||
return 15;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
230
MHQuestHelperLib/MH2Tools.cs
Normal file
230
MHQuestHelperLib/MH2Tools.cs
Normal file
@ -0,0 +1,230 @@
|
||||
using System.Text;
|
||||
|
||||
namespace MHQuestHelperLib
|
||||
{
|
||||
public class MH2Tools
|
||||
{
|
||||
#region 公开属性
|
||||
/// <summary>
|
||||
/// 任务信息头部指针
|
||||
/// </summary>
|
||||
public int QuestInfoPtr => HexHelper.bytesToInt(target, 4, 0x00);
|
||||
|
||||
//固体值
|
||||
public int StandInfo_MonsterPtr => 0x48;
|
||||
public int StandInfo_Monster => HexHelper.bytesToInt(target, 4, StandInfo_MonsterPtr);
|
||||
//小怪强度
|
||||
public int StandInfo_SamllMonsterPtr => 0x61;
|
||||
public int StandInfo_SamllMonster => HexHelper.bytesToInt(target, 4, StandInfo_SamllMonsterPtr);
|
||||
//体型
|
||||
public int StandInfo_MonsterSizePtr => 0x44;
|
||||
public int StandInfo_MonsterSize => HexHelper.bytesToInt(target, 4, StandInfo_MonsterSizePtr);
|
||||
//体型范围
|
||||
public int StandInfo_MonsterSizeRangePtr => 0x46;
|
||||
public int StandInfo_MonsterSizeRange => HexHelper.bytesToInt(target, 4, StandInfo_MonsterSizeRangePtr);
|
||||
public int StandInfo_MainHRPPtr => 0x4C;
|
||||
public int StandInfo_MainHRP => HexHelper.bytesToInt(target, 4, StandInfo_MainHRPPtr);
|
||||
public int StandInfo_SubAHRPPtr => 0x54;
|
||||
public int StandInfo_SubAHRP => HexHelper.bytesToInt(target, 4, StandInfo_SubAHRPPtr);
|
||||
public int StandInfo_SubBHRPPtr => 0x58;
|
||||
public int StandInfo_SubBHRP => HexHelper.bytesToInt(target, 4, StandInfo_SubBHRPPtr);
|
||||
//怪物到达位置
|
||||
public int StandInfo_LarBoss_CarvePtr = 0x5C;
|
||||
public int StandInfo_LarBoss_Carve => HexHelper.bytesToInt(target, 4, StandInfo_LarBoss_CarvePtr);
|
||||
|
||||
/// <summary>
|
||||
/// 角色场景头部指针
|
||||
/// </summary>
|
||||
public int CharactorScenePtr => HexHelper.bytesToInt(target, 4, 0x04);
|
||||
/// <summary>
|
||||
/// BOSS头部指针
|
||||
/// </summary>
|
||||
public int BOSSInFoPtr => HexHelper.bytesToInt(target, 4, 0x18);
|
||||
|
||||
/// <summary>
|
||||
/// 怪物1
|
||||
/// </summary>
|
||||
public int BOSSInFo_Monster1IDPtr => HexHelper.bytesToInt(target, 4, 0x18 + 16);
|
||||
public int BOSSInFo_Monster2IDPtr => HexHelper.bytesToInt(target, 4, 0x18 + 16 + 4);
|
||||
public int BOSSInFo_Monster3IDPtr => HexHelper.bytesToInt(target, 4, 0x18 + 16 + 8);
|
||||
public int BOSSInFo_Monster4IDPtr => HexHelper.bytesToInt(target, 4, 0x18 + 16 + 12);
|
||||
|
||||
/// <summary>
|
||||
/// 报酬指针
|
||||
/// </summary>
|
||||
public int QuestRewardPtr => HexHelper.bytesToInt(target, 4, 0x0C);
|
||||
/// <summary>
|
||||
/// 支给品指针
|
||||
/// </summary>
|
||||
public int SuppliesItemPtr => HexHelper.bytesToInt(target, 4, 0x08);
|
||||
/// <summary>
|
||||
/// 采集点头部指针
|
||||
/// </summary>
|
||||
public int ItemPointPtr => HexHelper.bytesToInt(target, 4, 0x38);
|
||||
/// <summary>
|
||||
/// 鱼群指针
|
||||
/// </summary>
|
||||
public int FishGroupPtr => HexHelper.bytesToInt(target, 4, 0x40);
|
||||
|
||||
|
||||
#region
|
||||
/// <summary>
|
||||
/// 契约金指针
|
||||
/// </summary>
|
||||
public int QuestInfo_StarPtr => QuestInfoPtr + 4;
|
||||
public int QuestInfo_Star => HexHelper.bytesToInt(target, 2, QuestInfo_StarPtr);
|
||||
/// <summary>
|
||||
/// 契约金指针
|
||||
/// </summary>
|
||||
public int QuestInfo_FeePtr => QuestInfoPtr + 8;
|
||||
public int QuestInfo_Fee => HexHelper.bytesToInt(target, 4, QuestInfo_FeePtr);
|
||||
/// <summary>
|
||||
/// 报酬金指针
|
||||
/// </summary>
|
||||
public int QuestInfo_RewardMoneyPtr => QuestInfoPtr + 12;
|
||||
public int QuestInfo_RewardMoney => HexHelper.bytesToInt(target, 4, QuestInfo_RewardMoneyPtr);
|
||||
/// <summary>
|
||||
/// 支线A报酬金指针
|
||||
/// </summary>
|
||||
public int QuestInfo_SubARewardMoneyPtr => QuestInfoPtr + 20;
|
||||
public int QuestInfo_SubARewardMoney => HexHelper.bytesToInt(target, 4, QuestInfo_SubARewardMoneyPtr);
|
||||
/// <summary>
|
||||
/// 支线B报酬金指针
|
||||
/// </summary>
|
||||
public int QuestInfo_SubBRewardMoneyPtr => QuestInfoPtr + 24;
|
||||
public int QuestInfo_SubBRewardMoney => HexHelper.bytesToInt(target, 4, QuestInfo_SubBRewardMoneyPtr);
|
||||
/// <summary>
|
||||
/// 支线B报酬金指针
|
||||
/// </summary>
|
||||
public int QuestInfo_TimePtr => QuestInfoPtr + 28;
|
||||
public int QuestInfo_Time => HexHelper.bytesToInt(target, 4, QuestInfo_TimePtr);
|
||||
/// <summary>
|
||||
/// 契约金指针
|
||||
/// </summary>
|
||||
public int QuestInfo_PenaltyPtr => QuestInfoPtr + 16;
|
||||
public int QuestInfo_Penalty => HexHelper.bytesToInt(target, 4, QuestInfo_PenaltyPtr);
|
||||
/// <summary>
|
||||
/// 主线目标指针
|
||||
/// </summary>
|
||||
public int QuestInfo_MainTypePtr => QuestInfoPtr + 44;
|
||||
public int QuestInfo_MainType => HexHelper.bytesToInt(target, 4, QuestInfo_MainTypePtr);
|
||||
/// <summary>
|
||||
/// 主线目标(怪或道具)指针
|
||||
/// </summary>
|
||||
public int QuestInfo_MainTargetIDPtr => QuestInfoPtr + 48;
|
||||
public int QuestInfo_MainTargetID => HexHelper.bytesToInt(target, 2, QuestInfo_MainTargetIDPtr);
|
||||
/// <summary>
|
||||
/// 主线目标(怪或道具)指针
|
||||
/// </summary>
|
||||
public int QuestInfo_MainTargetCountPtr => QuestInfoPtr + 50;
|
||||
public int QuestInfo_MainTargetCount => HexHelper.bytesToInt(target, 2, QuestInfo_MainTargetCountPtr);
|
||||
/// <summary>
|
||||
/// 支线A目标指针
|
||||
/// </summary>
|
||||
public int QuestInfo_SubATypePtr => QuestInfoPtr + 52;
|
||||
public int QuestInfo_SubAType => HexHelper.bytesToInt(target, 4, QuestInfo_SubATypePtr);
|
||||
/// <summary>
|
||||
/// 支线A目标(怪或道具)指针
|
||||
/// </summary>
|
||||
public int QuestInfo_SubATargetIDPtr => QuestInfoPtr + 56;
|
||||
public int QuestInfo_SubATargetID => HexHelper.bytesToInt(target, 2, QuestInfo_SubATargetIDPtr);
|
||||
/// <summary>
|
||||
/// 支线A目标(怪或道具)指针
|
||||
/// </summary>
|
||||
public int QuestInfo_SubATargetCountPtr => QuestInfoPtr + 58;
|
||||
public int QuestInfo_SubATargetCount => HexHelper.bytesToInt(target, 2, QuestInfo_SubATargetCountPtr);
|
||||
|
||||
/// <summary>
|
||||
/// 支线B目标指针
|
||||
/// </summary>
|
||||
public int QuestInfo_SubBTypePtr => QuestInfoPtr + 60;
|
||||
public int QuestInfo_SubBType => HexHelper.bytesToInt(target, 4, QuestInfo_SubBTypePtr);
|
||||
/// <summary>
|
||||
/// 支线B目标(怪或道具)指针
|
||||
/// </summary>
|
||||
public int QuestInfo_SubBTargetIDPtr => QuestInfoPtr + 64;
|
||||
public int QuestInfo_SubBTargetID => HexHelper.bytesToInt(target, 2, QuestInfo_SubBTargetIDPtr);
|
||||
/// <summary>
|
||||
/// 支线B目标(怪或道具)指针
|
||||
/// </summary>
|
||||
public int QuestInfo_SubBTargetCountPtr => QuestInfoPtr + 66;
|
||||
public int QuestInfo_SubBTargetCount => HexHelper.bytesToInt(target, 2, QuestInfo_SubBTargetCountPtr);
|
||||
#endregion
|
||||
|
||||
#region 文本类细节指针
|
||||
/// <summary>
|
||||
/// 任务文本开头指针
|
||||
/// </summary>
|
||||
public int QuestStrings_StartPtr => HexHelper.bytesToInt(target, 4, QuestInfoPtr + 36);
|
||||
/// <summary>
|
||||
/// 任务文本开头指针
|
||||
/// </summary>
|
||||
public int QuestStrings_TitleAndNamePtr => HexHelper.bytesToInt(target, 4, QuestStrings_StartPtr);
|
||||
public int QuestStrings_MainoObjPtr => HexHelper.bytesToInt(target, 4, QuestStrings_StartPtr + 4);
|
||||
public int QuestStrings_AObjPtr => HexHelper.bytesToInt(target, 4, QuestStrings_StartPtr + 8);
|
||||
public int QuestStrings_BObjPtr => HexHelper.bytesToInt(target, 4, QuestStrings_StartPtr + 12);
|
||||
public int QuestStrings_ClearCPtr => HexHelper.bytesToInt(target, 4, QuestStrings_StartPtr + 16);
|
||||
public int QuestStrings_FailCPtr => HexHelper.bytesToInt(target, 4, QuestStrings_StartPtr + 20);
|
||||
public int QuestStrings_HirerPtr => HexHelper.bytesToInt(target, 4, QuestStrings_StartPtr + 24);
|
||||
public int QuestStrings_TextPtr => HexHelper.bytesToInt(target, 4, QuestStrings_StartPtr + 28);
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
byte[] target;
|
||||
public MH2Tools(byte[] src)
|
||||
{
|
||||
target = HexHelper.CopyByteArr(src);//加载数据
|
||||
}
|
||||
|
||||
#region 指针查询类
|
||||
|
||||
#endregion
|
||||
|
||||
#region 读取类
|
||||
|
||||
public byte[] GetCurrData()
|
||||
{
|
||||
return target;
|
||||
}
|
||||
|
||||
public byte[] GetFullData(int lenght, int offset)
|
||||
{
|
||||
return HexHelper.ReadBytes(target, lenght,offset);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 操作类
|
||||
|
||||
public void ModifyByte(int index, byte data)
|
||||
{
|
||||
target[index] = data;
|
||||
}
|
||||
|
||||
public void ModifyStringToBytes(string newdata, int startoffset)
|
||||
{
|
||||
List<byte> data = Encoding.GetEncoding("Shift_JIS").GetBytes(newdata.Replace("\r\n", "\n")).ToList();
|
||||
if (data[data.Count - 1] != 0x00)
|
||||
{
|
||||
//Write
|
||||
List<byte> divider = new List<byte>
|
||||
{
|
||||
00
|
||||
};
|
||||
data.AddRange(divider);
|
||||
}
|
||||
|
||||
HexHelper.ModifyDataToBytes(target, data.ToArray(), startoffset);
|
||||
}
|
||||
|
||||
/**
|
||||
* 写入byte[]到byte[]
|
||||
*/
|
||||
public void ModifyDataToBytes(byte[] targetVal, int startoffset)
|
||||
{
|
||||
HexHelper.ModifyDataToBytes(target, targetVal, startoffset);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
9
MHQuestHelperLib/MHQuestHelperLib.csproj
Normal file
9
MHQuestHelperLib/MHQuestHelperLib.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
23
Program.cs
Normal file
23
Program.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace mhfz_quest_editor
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Editor());
|
||||
}
|
||||
}
|
||||
}
|
177
monster.txt
Normal file
177
monster.txt
Normal file
@ -0,0 +1,177 @@
|
||||
None
|
||||
Rathian
|
||||
Fatalis
|
||||
Kelbi
|
||||
Mosswine
|
||||
Bullfango
|
||||
Yian Kut-Ku
|
||||
Lao-Shan Lung
|
||||
Cephadrome
|
||||
Felyne
|
||||
Veggie Elder
|
||||
Rathalos
|
||||
Aptonoth
|
||||
Genprey
|
||||
Diablos
|
||||
Khezu
|
||||
Velociprey
|
||||
Gravios
|
||||
Felyne?
|
||||
Vespoid
|
||||
Gypceros
|
||||
Plesioth
|
||||
Basarios
|
||||
Melynx
|
||||
Hornetaur
|
||||
Apceros
|
||||
Monoblos
|
||||
Velocidrome
|
||||
Gendrome
|
||||
Rocks
|
||||
Ioprey
|
||||
Iodrome
|
||||
Pugis
|
||||
Kirin
|
||||
Cephalos
|
||||
Giaprey / Giadrome
|
||||
Crimson Fatalis
|
||||
Pink Rathian
|
||||
Blue Yian Kut-Ku
|
||||
Purple Gypceros
|
||||
Yian Garuga
|
||||
Silver Rathalos
|
||||
Gold Rathian
|
||||
Black Diablos
|
||||
White Monoblos
|
||||
Red Khezu
|
||||
Green Plesioth
|
||||
Black Gravios
|
||||
Daimyo Hermitaur
|
||||
Azure Rathalos
|
||||
Ashen Lao-Shan Lung
|
||||
Blangonga
|
||||
Congalala
|
||||
Rajang
|
||||
Kushala Daora
|
||||
Shen Gaoren
|
||||
Great Thunderbug
|
||||
Shakalaka
|
||||
Yama Tsukami
|
||||
Chameleos
|
||||
Rusted Kushala Daora
|
||||
Blango
|
||||
Conga
|
||||
Remobra
|
||||
Lunastra
|
||||
Teostra
|
||||
Hermitaur
|
||||
Shogun Ceanataur
|
||||
Bulldrome
|
||||
Anteka
|
||||
Popo
|
||||
White Fatalis
|
||||
Yama Tsukami
|
||||
Ceanataur
|
||||
Hypnocatrice
|
||||
Lavasioth
|
||||
Tigrex
|
||||
Akantor
|
||||
Bright Hypnoc
|
||||
Lavasioth Subspecies
|
||||
Espinas
|
||||
Orange Espinas
|
||||
White Hypnoc
|
||||
Akura Vashimu
|
||||
Akura Jebia
|
||||
Berukyurosu
|
||||
Cactus
|
||||
Gorge Objects
|
||||
Gorge Rocks
|
||||
Pariapuria
|
||||
White Espinas
|
||||
Kamu Orugaron
|
||||
Nono Orugaron
|
||||
Raviente
|
||||
Dyuragaua
|
||||
Doragyurosu
|
||||
Gurenzeburu
|
||||
Burukku
|
||||
Erupe
|
||||
Rukodiora
|
||||
Unknown
|
||||
Gogomoa
|
||||
Kokomoa
|
||||
Taikun Zamuza
|
||||
Abiorugu
|
||||
Kuarusepusu
|
||||
Odibatorasu
|
||||
Disufiroa
|
||||
Rebidiora
|
||||
Anorupatisu
|
||||
Hyujikiki
|
||||
Midogaron
|
||||
Giaorugu
|
||||
Mi Ru
|
||||
Farunokku
|
||||
Pokaradon
|
||||
Shantien
|
||||
Pokara
|
||||
Dummy
|
||||
Goruganosu
|
||||
Aruganosu
|
||||
Baruragaru
|
||||
Zerureusu
|
||||
Gougarf
|
||||
Uruki
|
||||
Forokururu
|
||||
Meraginasu
|
||||
Diorekkusu
|
||||
Garuba Daora
|
||||
Inagami
|
||||
Varusaburosu
|
||||
Poborubarumu
|
||||
Duremudira
|
||||
UNK1
|
||||
Felyne
|
||||
Blue NPC
|
||||
UNK2
|
||||
Cactus
|
||||
Veggie Elders
|
||||
Gureadomosu
|
||||
Harudomerugu
|
||||
Toridcless
|
||||
Gasurabazura
|
||||
Kusubami
|
||||
Yama Kurai
|
||||
Dure 3rd Phase
|
||||
Zinogre
|
||||
Deviljho
|
||||
Brachydios
|
||||
Berserk Laviente
|
||||
Toa Tesukatora
|
||||
Barioth
|
||||
Uragaan
|
||||
Stygian Zinogre
|
||||
Guanzorumu
|
||||
Starving Deviljho
|
||||
UNK3
|
||||
Egyurasu
|
||||
Voljang
|
||||
Nargacuga
|
||||
Keoaruboru
|
||||
Zenaserisu
|
||||
Gore Magala
|
||||
Blinking Nargacuga
|
||||
Shagaru Magala
|
||||
Amatsu
|
||||
Eruzerion
|
||||
Musou Dure
|
||||
Rocks
|
||||
Seregios
|
||||
Bogabadorumu
|
||||
Unknown Blue Barrel
|
||||
Musou Bogabadorumu
|
||||
Costumed Uruki
|
||||
Musou Zerureusu
|
||||
PSO2 Rappy
|
||||
King Shakalaka
|
Loading…
Reference in New Issue
Block a user