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

Fix: Mana on XP Spend #319

Merged
merged 3 commits into from
May 4, 2017
Merged

Conversation

fantoms
Copy link
Contributor

@fantoms fantoms commented May 3, 2017

  • Fixed character's total Mana points after spending experience points on Self.
  • Noticed that the @heal command may prevent vitals increasing.

* Fixed the @HEAL command from raising the wrong attribute and getting the client out of wack
@fantoms
Copy link
Contributor Author

fantoms commented May 3, 2017

This pr was created to address issue #296. To address the mana updates, a mana update message is now sent when self is updated.

After changing the @heal command to use a different message, the health and mana rankUp began to work correctly on the client, during my testing.

@@ -1025,9 +1025,9 @@ public static void HandleHeal(Session session, params string[] parameters)
session.Player.Stamina.Current = session.Player.Stamina.UnbuffedValue;
session.Player.Mana.Current = session.Player.Mana.UnbuffedValue;

var updatePlayersHealth = new GameMessagePrivateUpdateAttribute2ndLevel(session, Vital.Health, session.Player.Health.Current);
var updatePlayersStamina = new GameMessagePrivateUpdateAttribute2ndLevel(session, Vital.Stamina, session.Player.Stamina.Current);
var updatePlayersMana = new GameMessagePrivateUpdateAttribute2ndLevel(session, Vital.Mana, session.Player.Mana.Current);
Copy link
Member

Choose a reason for hiding this comment

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

GameMessagePrivateUpdateAttribute2ndLevel is the right message for what this command is doing, I think you've found an error with how we're handling the sequence for this message however.
vitalupdates

3 different numbers in a row based on this retail pcap...

Copy link
Member

@LtRipley36706 LtRipley36706 left a comment

Choose a reason for hiding this comment

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

Investigate issue as a sequence error

@fantoms fantoms changed the title Fix: Mana on XP Spend and @heal command change Fix: Mana on XP Spend May 3, 2017
@Mogwai-TheFurry Mogwai-TheFurry merged commit 7109c90 into ACEmulator:master May 4, 2017
Mogwai-TheFurry added a commit that referenced this pull request May 4, 2017
Mogwai-TheFurry added a commit that referenced this pull request May 4, 2017
* Revert "Fix: Mana on XP Spend (#319)"

This reverts commit 7109c90.

* Revert "database object factory (#325)"

This reverts commit afdce36.
@fantoms fantoms deleted the fix-manaupdate branch May 23, 2017 15:52
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

3 participants