summaryrefslogtreecommitdiff
path: root/src/map/clif.c
AgeCommit message (Collapse)AuthorFilesLines
2016-07-10Use different interface members for start sc effects and show started effect ↵Andrei Karas1-2/+3
to other. Added interface member clif->sc_continue for already started effects.
2016-07-08Fixed a compilation error on packetvers older than 20071106Haru1-29/+37
Fixes #1345 Signed-off-by: Haru <haru@dotalux.com>
2016-07-02Trivialities: indentation fixesHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-07-02Fix guild skill range check in clif_parse_UseSkillToId.Andrei Karas1-1/+1
Wrong check prevent from using custom skills with id after guild skills.
2016-06-30Use item attribute as flags varible. Now only ATTR_BROKEN flag exists.Andrei Karas1-4/+4
2016-06-25Added option to strip hard line-breaks from `mes` dialogsHaru1-0/+14
- The `\r` character, in a `mes` dialog, is normally represented by the client as a hard line-break. - Since a client may have different requirements in line lengths (for example using a font with different size or metrics), an user might wish to ignore hard-wraps and let the client automatically soft-wrap instead. - If you want to hard-wrap (official default), keep the SCRIPT_MES_STRIP_LINEBREAK define commented out. - If you want to let the client soft-wrap automatically (may work better for custom clients), uncomment it. - Imprved HULD handling of `\r` (to avoid control characters in the generated file) - Please note that this requires cooperation by script writers: * Each `mes` should contain one and only one sentence, possibly without using the '+' concatenation (but, rather, sprintf). * Two separate sentences (where a hard-wrap is required even for soft-wrapped text) should always go into separate `mes` commands. * Following the above two recommendations, also produces a better quality translations .pot file. Signed-off-by: Haru <haru@dotalux.com>
2016-06-23Interface clif_bl_type now it's clif->bl_typehemagx1-6/+7
2016-06-23Interface disguised function, now it's clif->isdisguised.hemagx1-50/+59
2016-06-23Fix Possible Crash on clif_bl_type now it checks if vd is nullhemagx1-12/+30
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