summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-24Removed unnecessary explicit casts of the value of WBUFPHaru1-1/+1
- WBUFP now returns a pointer to void, which automatically casts to any non-const or const pointer. Signed-off-by: Haru <haru@dotalux.com>
2016-02-22Fix crash on npc emote, if npc not found.Andrei Karas1-1/+1
Reported in http://herc.ws/board/topic/11994-map-crashed-on-friendly-poring-quest-novice-quest/
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-62/+62
Add all missing -Wformat flags into configure.
2016-02-19Fix some cast discards 'const' qualifier from pointer target type warnings.Andrei Karas1-3/+3
Add -Wcast-qual into configure comment.
2016-02-17Replaced some now unnecessary includes with forward declarations in header filesHaru1-0/+1
Added some forgotten <stdio.h> and "common/conf.h" includes to .c files, that were previously masked by the above. Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Removed unnecessary typedefs from libconfigHaru1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru1-5/+6
- The return value is now consistent with the libconfig standard (CONFIG_TRUE/CONFIG_FALSE). - Removed some redundant error messages. Signed-off-by: Haru <haru@dotalux.com>
2016-02-05Merge pull request #993 from HerculesWS/mobdb2sqlAndrei Karas1-18/+12
Mob DB support for the db2sql plugin
2016-01-29Merge pull request #1108 from 4144/pcreconfigureHaru1-12/+0
Enable pcre by default in configure and show error if pcre missing.
2016-01-29Replaced several floating-point operations with integer operationsHaru1-18/+12
This fixes several rounding errors happening in various places (i.e. the base exp for HORONG being calculated as 819 instead of 820 when the server rates are set to 1x) Signed-off-by: Haru <haru@dotalux.com>
2016-01-25Added source support for special comments in the constdbHaru1-7/+33
- To be used by the constdb2doc plugin Signed-off-by: Haru <haru@dotalux.com>
2016-01-21Remove unused PCRE_SUPPORT define.Andrei Karas1-12/+0
2016-01-16Removed Hard Coded data for SC_ALL_RIDING.Jedzkie1-1/+1
2016-01-16set_constant the LOOK_ constantsAnnieRuru1-0/+16
2016-01-16Add EQP_ = Equipment Position constantsAnnieRuru1-0/+23
2016-01-13Added support to mark constants in db/constants.conf as deprecatedHaru1-91/+106
Signed-off-by: Haru <haru@dotalux.com>
2016-01-13Converted const.txt to libconfig formatHaru1-22/+50
- This is necessary for upcoming improvements Signed-off-by: Haru <haru@dotalux.com>
2016-01-12Whitespace cleanup (removed alignment tabs or trailing whitespace at line end)Haru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-12Replaced 22-bit mask entry with a regular uint32 in the noviewid mapflag ↵Haru1-2/+2
implementation As per ultramage's suggestion in #926 Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced the remaining explicit casts with BL_CAST/BL_UCASTHaru1-6/+14
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCASTHaru1-26/+32
- Replaced safe casts (bl type already checked) Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some map->id2sd calls with the proper map->id2XX functionHaru1-98/+96
- Also added new map->id2XX convenience functions for the other bl types. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCAST/BL_UCCASTHaru1-38/+97
- Replaced casts in foreach callbacks. - Added assertions and nullpo checks where applicable. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCAST/BL_UCCASTHaru1-5/+6
- Replaced the map-iterator related casts. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_NPC to struct npc_data as per style guidelineshemagx1-37/+38
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PET to struct pet_data as per style guidelineshemagx1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MER to struct mercenary_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_HOM to struct homun_data as per style guidelineshemagx1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MOB to struct mob_data as per strly guidelineshemagx1-8/+9
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PC to struct map_session_data as per style guidelineshemagx1-483/+396
Signed-off-by: Haru <haru@dotalux.com>
2016-01-05Add *swap script commandAnnieRuru1-0/+71
- extremely useful when writing algorithm functions Closes #1012 as merged Signed-off-by: Haru <haru@dotalux.com>
2016-01-05Fixed an unused variable warningHaru1-2/+0
Follow-up to 5020a123570a7b263f6b742df5891a36434473a0 Signed-off-by: Haru <haru@dotalux.com>
2016-01-05Added Support for BodyStyleDastgir1-0/+1
Closes #974 as merged
2016-01-05Merge pull request #1053 from Jedzkie/Transformation_Scrolls_UpdateDastgir1-2/+0
Monster Transform Update:
2016-01-05Removal of Hard coded showscript command for Monster Transform.Jedzkie1-2/+0
2016-01-03Fix *getitem2 and @item2 refine bug.Emistry1-1/+1
- Negative refine value isn't allowed.
2015-12-28Standardized (source) mob_id enumHaru1-1/+1
- MOBID_ constant names now follow the Mob DB spritenames. - The following names were changed: * MOBID_EMPERIUM => MOBID_EMPELIUM * MOBID_TREAS01 => MOBID_TREASURE_BOX1 * MOBID_TREAS40 => MOBID_TREASURE_BOX40 * MOBID_BARRICADE1 => MOBID_BARRICADE * MOBID_BARRICADE2 => MOBID_BARRICADE_ * MOBID_GUARIDAN_STONE1 => MOBID_S_EMPEL_1 * MOBID_GUARIDAN_STONE2 => MOBID_S_EMPEL_2 * MOBID_FOOD_STOR => MOBID_OBJ_A * MOBID_BLUE_CRYST => MOBID_OBJ_A2 * MOBID_PINK_CRYST => MOBID_OBJ_B2 * MOBID_TREAS41 => MOBID_TREASURE_BOX41 * MOBID_TREAS49 => MOBID_TREASURE_BOX49 - Added several missing items Signed-off-by: Haru <haru@dotalux.com>
2015-12-26Add *setgroupid script commands.Emistry1-0/+25
Useful for scripts that temporary adjust the group id of players.
2015-12-25Fix various ShowWarning that doesn't tell the source of the errorAnnieRuru1-7/+7
Closes #868 as merged
2015-12-25Implemented NoViewIDDastgir1-0/+3
(http://herc.ws/board/topic/10020-official-mapflag-to-disable-viewid/) Closes #926 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-22Throw error when variable name length too longAnnieRuru1-0/+14
2015-12-22Update *dispbottom script command to allow 0xRRGGBB colorAnnieRuru1-9/+21
Closes #858 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-22Update *message script command to allow to use account IDAnnieRuru1-8/+13
Signed-off-by: Haru <haru@dotalux.com>
2015-12-20*explode return array size.Emistry1-0/+2
http://herc.ws/board/topic/7489-explode-to-push-arraysize/ Closes #700 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-20Fixed a memory leak in the explode script commandHaru1-18/+16
Minor refactoring Signed-off-by: Haru <haru@dotalux.com>
2015-12-20Fix the *getcharipAnnieRuru1-6/+13
-> it uses the dirties method to search for player -> seriously ? why have to search account_id AND char_id ? -> if the char_id gone big enough, it can reach to account_id
2015-12-20Fix certain script command report source npc twice if player not attachedAnnieRuru1-146/+136
Signed-off-by: Haru <haru@dotalux.com>
2015-12-20Change map->nick2sd into script>nick2sdAnnieRuru1-47/+46
- *getcharid and *getmapxy is exempted to check the condition Signed-off-by: Haru <haru@dotalux.com>
2015-12-20Change map->charid2sd into script->charid2sdAnnieRuru1-12/+11
- *charid2rid is exempted to check the condition Signed-off-by: Haru <haru@dotalux.com>
2015-12-20Change map->id2sd into script->id2sdAnnieRuru1-37/+33
- these 4 commands are exempted, because they are meant to check the condition: *playerattached, *attachrid, *isloggedin, *sleep2 Signed-off-by: Haru <haru@dotalux.com>