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

Small optimization on change sex #8281

Merged
merged 3 commits into from May 2, 2024
Merged

Conversation

Daegaladh
Copy link
Member

  • Addressed Issue(s): N/A
  • Server Mode: Both
  • Description of Pull Request: Small optimization when changing sex from sex specific classes.

@Daegaladh Daegaladh added status:code-review Pull Request that requires reviewing from other developers before being pushed to master type:maintenance Issue for refactoring rAthena labels Apr 25, 2024
Copy link
Contributor

@aleos89 aleos89 left a comment

Choose a reason for hiding this comment

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

A little longer but I see no issue in that since now it's much safer and less assumptions about the expected class.

@SapitoSucio
Copy link
Member

Could be done like this too, to shrink it a lil bit

switch (class_) {
	case JOB_BARD: class_ = JOB_DANCER; break;
	case JOB_DANCER: class_ = JOB_BARD; break;
	case JOB_CLOWN: class_ = JOB_GYPSY; break;
	...

@Daegaladh
Copy link
Member Author

Could be done like this too, to shrink it a lil bit

switch (class_) {
	case JOB_BARD: class_ = JOB_DANCER; break;
	case JOB_DANCER: class_ = JOB_BARD; break;
	case JOB_CLOWN: class_ = JOB_GYPSY; break;
	...

I could, but I thought it would be clearer this way

@aleos89
Copy link
Contributor

aleos89 commented Apr 27, 2024

Could be done like this too, to shrink it a lil bit


switch (class_) {

	case JOB_BARD: class_ = JOB_DANCER; break;

	case JOB_DANCER: class_ = JOB_BARD; break;

	case JOB_CLOWN: class_ = JOB_GYPSY; break;

	...

As my professor always said, white space is free when developing!

@Lemongrass3110 Lemongrass3110 merged commit 29a3c52 into master May 2, 2024
29 checks passed
@Lemongrass3110 Lemongrass3110 deleted the hotfix/changesexopt branch May 2, 2024 22:46
@Lemongrass3110 Lemongrass3110 removed the status:code-review Pull Request that requires reviewing from other developers before being pushed to master label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:maintenance Issue for refactoring rAthena
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants