summaryrefslogtreecommitdiff
path: root/src/map/clif.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-14Replaced 'unsigned int' with 'uint32' (guaranteed size) in all packed structsHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-05-08Fixed various issues pointed out by cppcheckHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Fixed a warning in VS2015Haru1-6/+7
Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Corrected truncation of the last letter in whisper messagesHaru1-7/+7
- Follow-up to ccfd054 - Fixes #1275 Signed-off-by: Haru <haru@dotalux.com>
2016-04-29Fix compilation warnings with gcc 6.Andrei Karas1-3/+0
2016-04-28Corrected truncation of the last letter in party messagesHaru1-13/+15
- Discovered thanks to (and follow-up to) ccfd054 - Fixes #1270 Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Corrected the type of the 'length' argument of other message-related functionsHaru1-5/+5
- Variable types were changed to int - Corrects several warnings in VS2015 - Affected functions: `clif->wis_message()`, `intif->wis_message()`, `intif->guild_change_gm()`. Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Removed the 'len' argument from various message-related functionsHaru1-6/+10
- 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. - Affected functions: `clif->bg_message()`, `bg->send_message()`, `party->send_message()`, `guild->send_message()`. Signed-off-by: Haru <haru@dotalux.com> Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message()Haru1-10/+12
- 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-5/+5
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-23Corrected the type for several variables through the codeHaru1-72/+94
- Variable types were changed to int, where it makes sense to - Corrects several warnings in VS2015 Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Changed map_session_data::chatID to int (and renamed to chat_id)Haru1-14/+14
- Chat IDs are signed integers. - Resolves various warnings, depending on the compiler settings. Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Removed some code duplication in chat processing functionsHaru1-72/+5
Moved non-clif code that handles chat delay, atcommand detection, idle timers to pc.c Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Refactored the chat message packet processing functionsHaru1-180/+238
- Split the processing of public chat messages and whisper messages in two functions, to make them more straightforward. Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Split supernovice angel call message detection to its own functionHaru1-31/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBIteratorHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-03-19Updated Entity PacketsDastgir1-0/+3
2016-03-19status_get_name returns NULL instead of Unknown, Changed all functions to ↵Dastgir1-2/+2
use clif_get_bl_name
2016-03-19Implemented new function clif_get_bl_nameDastgir1-0/+17
2016-03-10Add new logging types.Andrei Karas1-3/+3
2016-02-24Edited npc->selllist() to use the new struct itemlistHaru1-5/+20
- 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 itemlistHaru1-5/+18
- 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 itemlistHaru1-21/+30
- 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 ↵Haru1-6/+14
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 itemlistHaru1-5/+14
- The npc-side code no longer depends on the client packet data layout. 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 resultHaru1-52/+52
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 WBUFPHaru1-24/+24
- 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 pointersHaru1-38/+58
- This is necessary for compatibility with a const RP2PTR/RFIFO2PTR Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed several unnecessary RFIFOP typecastsHaru1-56/+55
- 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-24Added const qualifier to several variable/argument pointersHaru1-100/+129
- 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-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-14/+14
Add all missing -Wformat flags into configure.
2016-02-17Removed unnecessary typedefs from libconfigHaru1-8/+8
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru1-6/+2
- 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-01-31Move P2PTR Macro to socket header and split the macro into two macros for ↵hemagx1-9/+14
WFIFO/RFIFO. Change packet database enums to defines in mmo.h
2016-01-29Merge pull request #1108 from 4144/pcreconfigureHaru1-2/+0
Enable pcre by default in configure and show error if pcre missing.
2016-01-25Fix packet id being sent encrypted to Hercules Plugin Manager.hemagx1-8/+8
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 Karas1-2/+0
2016-01-16Added OneClickIdentify packetDastgir1-0/+17
2016-01-12Whitespace cleanup (removed alignment tabs or trailing whitespace at line end)Haru1-16/+16
Signed-off-by: Haru <haru@dotalux.com>
2016-01-10Fixed an accidental MAX_CART_DECORATION leftoverHaru1-4/+4
Follow-up to a0f25125a6239894a86d51ae8dcf6a06a4d0a380 Signed-off-by: Haru <haru@dotalux.com>
2016-01-09Added support for MC_CARTDECORATE skill.Jedzkie1-0/+44
*This skill is supported only by 2015-08-05aRagexeRE clients onwards.* Closes #1025 as merged Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced the remaining explicit casts with BL_CAST/BL_UCASTHaru1-4/+9
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCASTHaru1-97/+109
- 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-25/+23
- 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-24/+23
- 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-7/+6
- Replaced the map-iterator related casts. Signed-off-by: Haru <haru@dotalux.com>