-
Notifications
You must be signed in to change notification settings - Fork 11
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
0af5357
commit 5b4e8ac
Showing
7 changed files
with
237 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.ComponentModel; | ||
|
||
namespace MonsterHunterStories2 | ||
{ | ||
class Character : INotifyPropertyChanged | ||
{ | ||
public event PropertyChangedEventHandler PropertyChanged; | ||
|
||
private readonly uint mAddress; | ||
|
||
public Character(uint address) | ||
{ | ||
mAddress = address; | ||
} | ||
|
||
public String Name | ||
{ | ||
get { return SaveData.Instance().ReadText(mAddress, 18); } | ||
set | ||
{ | ||
SaveData.Instance().WriteText(mAddress, 18, value); | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Name))); | ||
} | ||
} | ||
|
||
public uint Lv | ||
{ | ||
get { return SaveData.Instance().ReadNumber(mAddress + 234, 1); } | ||
set { Util.WriteNumber(mAddress + 234, 1, value, 1, 0xFF); } | ||
} | ||
|
||
|
||
} | ||
} |
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,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MonsterHunterStories2 | ||
{ | ||
class Monster : INotifyPropertyChanged | ||
{ | ||
public event PropertyChangedEventHandler PropertyChanged; | ||
|
||
private readonly uint mAddress; | ||
|
||
public Monster(uint address) | ||
{ | ||
mAddress = address; | ||
} | ||
|
||
public String Name | ||
{ | ||
get { return SaveData.Instance().ReadText(mAddress, 18); } | ||
set | ||
{ | ||
SaveData.Instance().WriteText(mAddress, 18, value); | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Name))); | ||
} | ||
} | ||
|
||
public uint ID | ||
{ | ||
get { return SaveData.Instance().ReadNumber(mAddress + 48, 4); } | ||
set | ||
{ | ||
SaveData.Instance().WriteNumber(mAddress + 48, 4, value); | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ID))); | ||
} | ||
} | ||
|
||
public uint Lv | ||
{ | ||
get { return SaveData.Instance().ReadNumber(mAddress + 86, 1); } | ||
set { Util.WriteNumber(mAddress + 86, 1, value, 1, 0xFF); } | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MonsterHunterStories2 | ||
{ | ||
class Weapon : INotifyPropertyChanged | ||
{ | ||
public event PropertyChangedEventHandler PropertyChanged; | ||
|
||
private readonly uint mAddress; | ||
|
||
public Weapon(uint address) | ||
{ | ||
mAddress = address; | ||
} | ||
|
||
public uint ID | ||
{ | ||
get { return SaveData.Instance().ReadNumber(mAddress, 4); } | ||
set | ||
{ | ||
SaveData.Instance().WriteNumber(mAddress, 4, value); | ||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Type))); | ||
} | ||
} | ||
|
||
public uint Lv | ||
{ | ||
get { return SaveData.Instance().ReadNumber(mAddress + 4, 2); } | ||
set { Util.WriteNumber(mAddress + 4, 2, value, 1, 0xFFFF); } | ||
} | ||
} | ||
} |