-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee5271e
commit 5ce7919
Showing
5 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "NPC.h" | ||
|
||
#include <ESLoader.h> | ||
|
||
NPC::Data NPC::ParseChunks() noexcept | ||
{ | ||
Data data; | ||
|
||
IterateChunks([&](ChunkId aChunkId, Buffer::Reader& aReader) { | ||
switch (aChunkId) | ||
{ | ||
case ChunkId::ACBS_ID: | ||
data.m_baseStats = Chunks::ACBS(aReader); | ||
break; | ||
case ChunkId::DOFT_ID: | ||
data.m_defaultOutfit = Chunks::DOFT(aReader); | ||
break; | ||
} | ||
}); | ||
|
||
return data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include "Record.h" | ||
#include "Chunks.h" | ||
|
||
// https://en.uesp.net/wiki/Skyrim_Mod:Mod_File_Format/NPC | ||
class NPC : Record | ||
{ | ||
public: | ||
static constexpr FormEnum kType = FormEnum::NPC_; | ||
|
||
struct Data | ||
{ | ||
Chunks::ACBS m_baseStats{}; | ||
Chunks::DOFT m_defaultOutfit{}; | ||
}; | ||
|
||
Data ParseChunks() noexcept; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters