-
Notifications
You must be signed in to change notification settings - Fork 772
Standardize to "all" in script commands #2380
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
Conversation
|
imo, keywords shall be non-case-sensitive, or forced all of them into uppercase or lowercase.
Perhaps the documentations shall mention that keywords Last but not least, consider to use |
|
|
I agree with Dastgir that this could be standardized this into a lowercase For backward compatibility it could still accept if (strcmpi(event, "all") == 0) {
if (strcmp(event, "all") != 0) { // Wrong case, deprecated
ShowWarning("...");
}
allflag = 1;
} else {
script->check_event(st, event);
}But that's up to you, or can be done at a later time, I'm fine with it either way for now. |
|
really hard to tell to standardize "all" or "All" in the source code too Search ""all"" (9 hits in 6 files)
D:\Ragnarok\Hercules\src\common\socket.c (1 hit)
Line 1287: if( strcmp(str,"all") == 0 ) {
D:\Ragnarok\Hercules\src\map\battleground.c (1 hit)
Line 329: if( strcmpi(parse,"all") == 0 )
D:\Ragnarok\Hercules\src\map\map.c (4 hits)
Line 3507: if (strcmpi(mapname, "all") == 0) {
Line 4295: if (strcmp(scriptname, "all") == 0) {
Line 4906: else if (!strcmpi(drop_arg2,"all"))
Line 5584: else if( strcmpi(parse,"all") == 0 ) {
D:\Ragnarok\Hercules\src\map\npc.c (1 hit)
Line 4454: else if (!strcmpi(drop_arg2,"all"))
D:\Ragnarok\Hercules\src\map\script.c (1 hit)
Line 14033: if( strcmp(event, "all") == 0 )
D:\Ragnarok\Hercules\src\map\skill.c (1 hit)
Line 11981: case WZ_QUAGMIRE: //The target changes to "all" if used in a gvg map. [Skotlex]Search ""All"" (9 hits in 5 files)
D:\Ragnarok\Hercules\src\map\itemdb.c (2 hits)
Line 1905: if (libconfig->setting_lookup_bool_real(t, "All", &enable_all) && enable_all) {
Line 1912: if (strcmp(job_name, "All") == 0)
D:\Ragnarok\Hercules\src\map\mapdefines.h (1 hit)
Line 94: #define MAP_ZONE_ALL_NAME "All"
D:\Ragnarok\Hercules\src\map\script.c (1 hit)
Line 11046: if(strcmp(event,"All")==0)
D:\Ragnarok\Hercules\src\map\skill.c (3 hits)
Line 20635: } else if (strcmpi(type, "All") == 0) {
Line 20736: } else if (strcmpi(type, "All") == 0) {
Line 20874: else if(!strcmpi(type,"All")) sk->unit_target = BCT_ALL;
D:\Ragnarok\Hercules\src\plugins\db2sql.c (2 hits)
Line 141: if (libconfig->setting_lookup_bool_real(t, "All", &enable_all) && enable_all) {
Line 148: if (strcmp(job_name, "All") == 0) |
Pull Request Prelude
Issues addressed
I don't want to memorize another special capital letter case
"All" and "all" is already enough for us -> #784
nobody was bother with the "All" and "all" because eathena/rathena is not case-sensitive script engine
during hercules early days, script engine became case-sensitive, and Emistry has asked to change it
Haru said this isn't an issue -> because it mentioned in script-commands
and we are being force to memorize
*killmonster-> "All",*mobcount-> "all"Changes Proposed
Standardize to "all" in script commands
Affected Branches
Known Issues and TODO List
hard to tell small or big is better
"this", "--en--", "--ja--", ...
"Leader", "SavePoint", "SavePointAll", "Leader" ...