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

expose the bank vault to the script engine #1717

Merged
merged 1 commit into from May 4, 2017

Conversation

Helianthella
Copy link
Member

@Helianthella Helianthella commented Apr 26, 2017

Pull Request Prelude

Changes Proposed

  • Expose map_session_data->status.bank_vault as BankVault to the script engine
  • Expose MAX_BANK_ZENY to the script engine
  • Update the documentation to reflect those changes

Why expose the vault?

  • Allows NPCs to manipulate the vault, so players with a client that does not support the vault packets can still deposit and withdraw money through a NPC.

Example

if (Zeny >= .@val && (BankVault + .@val) <= MAX_BANK_ZENY) {
    Zeny -= .@val;
    BankVault += .@val;
}



Affected Branches: master
Type: enhancement
Compopents: core, script engine, documentation
Tested on: ManaPlus
Needs testing on the official client


linked to https://gitlab.com/evol/serverdata/merge_requests/106

@MishimaHaruna MishimaHaruna added the status:code-review Awaiting code review label Apr 26, 2017
@HerculesWSAPI
Copy link
Contributor

This change is Reviewable

@@ -553,6 +553,7 @@ enum status_point_types { //we better clean up this enum and change it name [Hem
SP_MOD_EXP=125,
SP_MOD_DROP=126,
SP_MOD_DEATH=127,
SP_BANKVAULT=128,
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure is possible add any custom contants here. I think they related to aegis or client constants?

Copy link
Member

Choose a reason for hiding this comment

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

The first 100 are used by client, all constant above 100 are not related to client/aegis.

@Helianthella
Copy link
Member Author

@MishimaHaruna @4144 is there anything you want me to change?

@MishimaHaruna
Copy link
Member

Nothing to change, looks good to me.

I'm merging it, thank you!

@MishimaHaruna MishimaHaruna merged commit 1e46267 into HerculesWS:master May 4, 2017
@MishimaHaruna MishimaHaruna removed the status:code-review Awaiting code review label May 4, 2017
@Helianthella Helianthella deleted the vault2 branch May 4, 2017 13:30
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

5 participants