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

Refactor mapflags code #2654

Merged
merged 1 commit into from
Aug 24, 2020
Merged

Conversation

Emistry
Copy link
Member

@Emistry Emistry commented Mar 9, 2020

Pull Request Prelude

Changes Proposed

  • refactor mapflag related codes
  • rearranged the codes based on mapflag index (easier for future to find and refer?)
  • added missing mapflags.
	mf_nomapchannelautojoin:    61
	mf_noknockback:             62
	mf_cvc:                     63
	mf_src4instance             64

Issues addressed:
none

@Emistry Emistry added type:enhancement Issue describes an enhancement or feature that should be implemented component:core Affecting the Hercules core (i.e. not the game mechanics directly) component:scripts Affecting the scripts and NPCs labels Mar 9, 2020
@4144
Copy link
Contributor

4144 commented Mar 9, 2020

While you changed map flags, probably better remove map flags duplication.
Now at same time flags added into constants.conf and in C code.
Better remove them from constants.conf and add C enum values into script engine by script->set_constant, this can reduce future errors.

@Emistry
Copy link
Member Author

Emistry commented Mar 11, 2020

hmm should I keep the constants MF_*** lowercase like the old time? or uppercase is more prefer?

@Kenpachi2k13
Copy link
Member

I'd prefer upper case for the sake of consistency.

npc/custom/woe_controller.txt Outdated Show resolved Hide resolved
npc/other/poring_war.txt Outdated Show resolved Hide resolved
db/pre-re/item_db.conf Show resolved Hide resolved
db/re/item_db.conf Outdated Show resolved Hide resolved
db/re/item_db.conf Outdated Show resolved Hide resolved
src/map/npc.c Outdated Show resolved Hide resolved
src/map/npc.c Outdated Show resolved Hide resolved
src/map/script.c Outdated Show resolved Hide resolved
src/map/script.c Outdated Show resolved Hide resolved
src/map/script.c Outdated Show resolved Hide resolved
@Emistry Emistry force-pushed the mapflags_update branch 4 times, most recently from 4b5bca0 to 96689a0 Compare July 6, 2020 01:28
src/map/script.c Outdated Show resolved Hide resolved
src/map/script.c Outdated Show resolved Hide resolved
src/map/script.c Outdated Show resolved Hide resolved
src/map/script.c Outdated Show resolved Hide resolved
src/map/script.c Outdated Show resolved Hide resolved
src/map/atcommand.c Outdated Show resolved Hide resolved
return true;
}
for (i = 0; flag_name[i]; i++) flag_name[i] = TOLOWER(flag_name[i]); //lowercase

for (i = 0; flag_name[i]; i++)
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, my fault. It's flag_name[i] != '\0'.

- refactor codes.
- added missing mapflags.
@MishimaHaruna
Copy link
Member

Resolved a few remaining loose ends and force pushed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core Affecting the Hercules core (i.e. not the game mechanics directly) component:scripts Affecting the scripts and NPCs type:enhancement Issue describes an enhancement or feature that should be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants