Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added XpTable class to ACE.DatLoader and removed the JSON Xp files. #291

Merged
merged 3 commits into from
Apr 26, 2017
Merged

Added XpTable class to ACE.DatLoader and removed the JSON Xp files. #291

merged 3 commits into from
Apr 26, 2017

Conversation

OptimShi
Copy link
Collaborator

Some additional cleanup in the other DatLoader.FileTypes classes to make them easier to use.

Copy link
Contributor

@Mogwai-TheFurry Mogwai-TheFurry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, YAY! Nice work :)

Just need to do some simple performance improvements.

@@ -536,7 +536,8 @@ public QueuedGameAction ExaminationQueuePop()
public void GrantXp(ulong amount)
{
// until we are max level we must make sure that we send
var chart = DatabaseManager.Charts.GetLevelingXpChart();
XpTable xpTable = XpTable.ReadFromDat();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be read once and cached in a static variable. I'd rather have higher memory requirements than create performance issues of reading from dat files every time somebody clicks the up arrow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XpTable class is already a "singleton" and caches the dat loading. (I learned that from you what I did the CharGen stuff) You had me questioning if this was working, but I threw a breakpoint in there to confirm and it is working as intended.

@Mogwai-TheFurry Mogwai-TheFurry merged commit 3e751f5 into ACEmulator:master Apr 26, 2017
@OptimShi OptimShi deleted the DatReader.Levels branch April 27, 2017 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants