summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-23Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message()Haru1-1/+1
- The argument was redundant, since the passed value is always the same as the passed string's length (it doesn't make sense otherwise). The argument is implicit now. Less typing and less errors. Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Corrected the type of the 'length' argument of various broadcast-related ↵Haru1-14/+25
functions - Variable types were changed to int - Corrects several warnings in VS2015 - Affected functions: `clif->broadcast()`, `clif->broadcast2()`, `intif->broadcast()`, `intif->broadcast2()` Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Changed map_session_data::chatID to int (and renamed to chat_id)Haru1-1/+1
- Chat IDs are signed integers. - Resolves various warnings, depending on the compiler settings. Signed-off-by: Haru <haru@dotalux.com>
2016-04-04Merge pull request #1210 from HerculesWS/wcast_qualAndrei Karas1-148/+178
Added -Wcast-qual compiler flag
2016-04-02Unittalk script cmd shouldn't display the hidden name of npcAngelmelody1-1/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBMapHaru1-4/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBIteratorHaru1-11/+14
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru1-4/+7
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed unnecessary typedefs from sql.hHaru1-1/+2
- Sql -> struct Sql - SqlStmt -> struct SqlStmt - SqlDataType -> enum SqlDataType This is expected to improve compile time, by removing #include cycles (and forward declaring instead) Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added const qualifier to the value argument of script->setd_subHaru1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added separate char* and const char* data types to struct script_dataHaru1-69/+84
Used, respectively, by C_STR and C_CONSTSTR Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Changed script->get_val to return a const pointerHaru1-14/+17
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added const qualifier to some typecastsHaru1-41/+44
Signed-off-by: Haru <haru@dotalux.com>
2016-03-19Enable use of specialeffect 74,SELF,<npc>;Victor1-12/+14
Partly based on #1134 Closes #1134 as merged Signed-off-by: Haru <haru@dotalux.com>
2016-03-19status_get_name returns NULL instead of Unknown, Changed all functions to ↵Dastgir1-3/+3
use clif_get_bl_name
2016-03-11Hardcore Parameters from constant database to avoid synchronize issues with ↵hemagx1-0/+47
source now defining new parameters in the constants.conf database is deprecated and should be defined in source instead
2016-02-28Changed mob mode field to 32 bit, for future expansionHaru1-3/+4
Signed-off-by: Haru <haru@dotalux.com>
2016-02-27Corrected return value for some BUILDIN() functionsHaru1-4/+4
- The functions were returning `(bool)-1` instead of `false` in case of error, or `(bool)0` instead of `true` in case of success. Signed-off-by: Haru <haru@dotalux.com>
2016-02-27Replaced various '-1' with the correct constantHaru1-1/+1
INFINITE_DURATION, INVALID_TIMER, SC_NONE, INDEX_NOT_FOUND, depending on context. Signed-off-by: Haru <haru@dotalux.com>
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>