summaryrefslogtreecommitdiff
path: root/src/map
AgeCommit message (Collapse)AuthorFilesLines
2016-02-28Changed mob mode field to 32 bit, for future expansionHaru11-110/+154
Signed-off-by: Haru <haru@dotalux.com>
2016-02-28Added NoKnockback Mode for monstersDastgir3-1/+5
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 constantHaru10-86/+104
INFINITE_DURATION, INVALID_TIMER, SC_NONE, INDEX_NOT_FOUND, depending on context. Signed-off-by: Haru <haru@dotalux.com>
2016-02-27Corrected wrong variable type of struct status_change_data::tickHaru2-4/+6
- The variable should be signed, since it uses the value -1 to indicate infinite duration (and it's stored as signed in the database). - Added #define for the special value -1 (INFINITE_DURATION). - This fixes an issue causing status changes to fail being saved to database (thanks to Michi for reporting it). - Related to commit 8dc75721. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Edited npc->selllist() to use the new struct itemlistHaru3-34/+53
- The npc-side code no longer depends on the client data layout. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Edited npc->buylist() to use the new struct itemlistHaru3-41/+58
- The npc-side code no longer depends on the client data layout. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Edited npc->market_buylist() to use the new struct itemlistHaru5-55/+62
- The npc-side code no longer depends on the client data layout. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Edited skill->changematerial() and skill->elementalanalysis() to use the new ↵Haru3-22/+38
struct itemlist - The skill-side code no longer depends on the client packet data layout. - Some data validation has been added. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Edited npc->cashshop_buylist() to use the new struct itemlistHaru3-28/+37
- The npc-side code no longer depends on the client packet data layout. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Added definitions of struct itemlistHaru1-0/+8
- To be used in various non-clif functions that right now take client data buffers directly. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed various redundant typecastsHaru1-8/+8
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed several unnecessary explicit casts of the WFIFOP resultHaru4-59/+59
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed some now unnecessary explicit casts of the RBUFP resultHaru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed unnecessary explicit casts of the value of WBUFPHaru3-35/+35
- 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-24Added const qualifier to various variable/argument pointersHaru4-41/+64
- This is necessary for compatibility with a const RP2PTR/RFIFO2PTR Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed several unnecessary RFIFOP typecastsHaru4-96/+97
- While this is arguable, those explicit typecasts are potentially dangerous/misleading (for example, a const specifier might get accidentally dropped without even generating a compiler warning, or a variable type might change during code changes, and any related warning would get silenced by the explicit typecast). - As a reminder Hercules is written in C, and not in C++ (and there's no such thing as "compiling in C++ mode" - they're two different languages.) As such, it is legal to let the compiler automatically promote void* from/to any non-const pointer type, as well as const void* from/to any const pointer type. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Changed RFIFOP and WFIFOP to return const void * and void * respectivelyHaru1-1/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Updated homunculus_recv_data() to work better with const dataHaru1-18/+29
Now it no longer needs to memcpy data to a temporary buffer. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Added const qualifier to several variable/argument pointersHaru20-176/+230
- This is necessary for compatibility with a const RFIFOP. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Added const qualifier to the {RFIFO,RBUF}{B,W,L,Q} familiesHaru1-1/+3
A read FIFO/buffer should be, well, read-only. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Fixed two minor typos in NPC-related error/warning messagesHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-02-23Corrected some warnings in Visual StudioHaru3-97/+101
- Changed literal 1L values used in unit64 bit-shift operations to 1ULL. - Follow-up to f606519c3b611573ade246ec82db26437bf03668 (reported by zackdreaver) 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-21Changing Job field to 'int64'Dastgir3-13/+13
Signed-off-by: Haru <haru@dotalux.com>
2016-02-21New format for Job field in job_db.confDastgir2-12/+164
2016-02-19Remove some unused macroses. Left macroses in socket.cAndrei Karas1-4/+0
2016-02-19Add noreturn attributes.Andrei Karas1-1/+3
Also add compiler flag for check for missing noreturn attributes.
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas20-149/+149
Add all missing -Wformat flags into configure.
2016-02-19Fix some cast discards 'const' qualifier from pointer target type warnings.Andrei Karas6-25/+26
Add -Wcast-qual into configure comment.
2016-02-17Replaced some now unnecessary includes with forward declarations in header filesHaru7-5/+10
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 libconfigHaru18-141/+141
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru12-41/+39
- 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-09Small tweaks to mob_drop_adjustHaru1-7/+13
Related to #1152 Signed-off-by: Haru <haru@dotalux.com>
2016-02-06Changed PCRE to properly use the system-provided pcre.hHaru2-5/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-02-05Merge pull request #1081 from Jedzkie/PR_MAGNIFICATDastgir1-0/+4
PR_MAGNIFICAT Skill Fix.
2016-02-05Merge pull request #1087 from csnv/songsDastgir1-17/+62
Revamped Aegis style songs behavior. Fixes #835
2016-02-05Merge pull request #993 from HerculesWS/mobdb2sqlAndrei Karas7-367/+515
Mob DB support for the db2sql plugin
2016-01-31Move P2PTR Macro to socket header and split the macro into two macros for ↵hemagx2-16/+14
WFIFO/RFIFO. Change packet database enums to defines in mmo.h
2016-01-29Merge pull request #1108 from 4144/pcreconfigureHaru8-48/+2
Enable pcre by default in configure and show error if pcre missing.
2016-01-29Merge pull request #1105 from dastgir/20-SendFixHaru1-7/+11
Fixes crash with @send
2016-01-29Merge pull request #1100 from theultramage/gpermHaru1-1/+1
more meaningful names for fields of enum guild_permission
2016-01-29Re-added support for the JName field in the mob dbHaru1-0/+8
Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Replaced several floating-point operations with integer operationsHaru5-100/+101
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-29Modified Mob DB loader to behave like the Item DB loaderHaru3-271/+410
- Separated load and validation logic. - The load/validation functions now return the loaded mob ID Signed-off-by: Haru <haru@dotalux.com>
2016-01-25Added source support for special comments in the constdbHaru2-7/+34
- To be used by the constdb2doc plugin Signed-off-by: Haru <haru@dotalux.com>
2016-01-25Fix packet id being sent encrypted to Hercules Plugin Manager.hemagx2-11/+11
Now packet id will be passed to Hercules Plugin Manager instead of let it figure it on itself
2016-01-21Remove unused PCRE_SUPPORT define.Andrei Karas7-46/+0
2016-01-21Enable pcre by default in configure and show error if pcre missing.Andrei Karas1-2/+2
2016-01-17Merge pull request #1077 from csnv/masterHaru1-1/+15
Fixes monsters not taking rude attack when OFFICIAL_WALKPATH is used.