-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from matigramirez/v1
V1
- Loading branch information
Showing
322 changed files
with
7,802 additions
and
9,964 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
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 |
---|---|---|
@@ -1,34 +1,19 @@ | ||
using System; | ||
using Parsec; | ||
using Parsec.Shaiya.Svmap; | ||
using Parsec; | ||
using Parsec.Shaiya.SData; | ||
using Parsec.Shaiya.Skill; | ||
|
||
namespace Sample.Files; | ||
|
||
internal static class Program | ||
{ | ||
private static void Main(string[] args) | ||
{ | ||
// This sample shows how you can convert a shaiya file format (in this case svmap) into json to be able to | ||
// edit its properties as plain text, and then, convert it back to its original format | ||
SData.DecryptFile("/home/matias/Desktop/DBSkillData.SData", "/home/matias/Desktop/DBSkillData.dec.SData"); | ||
|
||
// Step 1: Read a svmap from a file | ||
Svmap svmap = Reader.ReadFromFile<Svmap>("2.svmap"); | ||
var skillData = ParsecReader.FromFile<DBSkillData>("/home/matias/Desktop/DBSkillData.dec.SData"); | ||
|
||
// You can go through and modify its properties here too | ||
foreach (Npc npc in svmap.Npcs) | ||
{ | ||
Console.WriteLine($"NpcId: {npc.NpcId}, Type: {npc.Type}"); | ||
} | ||
skillData.Write("/home/matias/Desktop/DBSkillData.dec.new.SData"); | ||
|
||
// Step 2: Export svmap as JSON | ||
svmap.WriteJson("2.svmap.json"); | ||
|
||
// Step 3: Modify the json file in any text editor | ||
|
||
// Step 4: Read svmap from the modified JSON file | ||
Svmap svmapFromJson = Reader.ReadFromJsonFile<Svmap>("2.svmap.json"); | ||
|
||
// Step 5: Write the edited instance as .svmap | ||
svmapFromJson.Write("2.edited.svmap"); | ||
var newSkillData = ParsecReader.FromFile<DBSkillData>("/home/matias/Desktop/DBSkillData.dec.new.SData"); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.