summaryrefslogtreecommitdiff
path: root/src/char/int_party.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-07Save party data if options are changed in inter_party_check_lv()Kenpachi Developer1-0/+1
2020-06-04Call inter_party_tosql() before clearing removed member's data in ↵Kenpachi Developer1-1/+1
inter_party_leave()
2020-02-09Merge pull request #2601 from Kenpachi2k13/int_party_c_warningHaru1-203/+297
Fix C4018 compiler warning in src\char\int_party.c.
2020-02-05Added inter_party_del_nonexistent_party() function.Kenpachi Developer1-7/+47
2020-02-05Applied code style to all modified functions in src/char/int_party.c.Kenpachi Developer1-143/+169
2020-02-05Replaced various inter_party_check_lv() calls with inter_party_calc_state() ↵Kenpachi Developer1-27/+8
calls, to ensure that family state gets updated correctly.
2020-02-05Added inter_party_is_family_party() function.Kenpachi Developer1-16/+81
* This should fix the issue where family share don't work if the family members don't occupy the first slots of the party. * Additionally made inter_party_check_exp_share() function also returning true, if party is in family state, since this state wasn't checked anywhere else and thus may caused misbehaviour, too.
2020-02-05Updated inter_party_calc_state() function.Kenpachi Developer1-17/+1
* inter_party_calc_state() function now calls inter_party_check_lv() function, instead of doing the same things on its own.
2020-02-05Updated inter_party_check_lv() function.Kenpachi Developer1-6/+4
* Improved assignment of p->min_lv and p->max_lv. * Removed unnecessary lv variable.
2020-02-05Changed some data types from unsigned to signed.Kenpachi Developer1-1/+1
* Changed all unsigned fields in struct party_data to signed int. * Changed data type of struct party_member->lv to signed int. * Changed parameter lv in inter_party_change_map() function to signed int. * Changed signature of inter_party_change_map() function in HPMHooking files.
2020-01-13Update copyright headers for year 2020Haru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2019-10-18Fix an issue that caused the saved character data to retain the old party ID ↵Haru1-3/+4
after leaving or getting kicked Signed-off-by: Haru <haru@dotalux.com>
2019-08-26Remove round-trip to the inter-server for the party messagesHaru1-1/+0
Signed-off-by: Haru <haru@dotalux.com>
2018-07-01Change functions to static where possible (Part 3 - char)Haru1-19/+21
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
2018-06-30Move mapif functions from int_party.c to mapif.cHaru1-233/+0
Signed-off-by: Haru <haru@dotalux.com>
2018-06-30Move some non-mapif functionality from the mapif interface to the ↵Haru1-46/+111
inter_party interface Signed-off-by: Haru <haru@dotalux.com>
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2017-09-19remove trailing whitespaces from sourcegumi1-1/+1
2017-04-09Fix wrong parameters in a call to mapif->party_broken()Haru1-1/+1
The call is in a code path currently unused, and so was never noticed during normal gameplay. The wrong line dates back to (j)Athena, and was already present in snapshots from 2003. Signed-off-by: Haru <haru@dotalux.com>
2017-02-12Follow-up 946b7f8490e952fbd90c6760f256ddfdd1e98137KirieZ1-16/+3
2016-12-23Follow-up 19c07f4KirieZ1-3/+3
2016-12-20Follow-up ea449a7, fixed coding-styleKirieZ1-8/+5
2016-12-18Changed behavior when party leader leaves it from party being disbanded to ↵KirieZ1-18/+24
leader being changed to the second user. Closes #1107
2016-12-03Clarify some Job Class vs MapID confusion (1/2)Haru1-2/+2
This commit ensures that `sd->status.class` and related variables only contain Job Classes (i.e. the client-compatible values, where High Novice 4001) and are never checked against the bitmask-based MapID values. As a rule of thumb, from now on, when a variable is named `class`, it is intended to contain a Job Class ID and not a MapID. The type of such variable shall be a signed `int16` or `int`. To ensure that related third party code is also verified when this commit is merged, the variable `struct mmo_charstatus::class_ (i.e. `sd->status.class_`) is renamed to `class`. Some issues in related lines are also fixed, including: - A wrong check in the char server would prevent the correct detection of babies in code related to the family exp sharing. - Baby Arch Bishops would not be affected by Eucharistica. - A wrong check would cause the `questinfo()` script command not to display its information for most classes (except 1-1 classes). - Map IDs and Job Classes were mixed up in `itemdb_jobid2mapid()` and `itemdb_jobmask2mapid()` for 1-1 classes (causing currently no harm, since they just happen to coincide). - The Baby Sura class would not cause parties to be marked as containing a monk type character (for SLS Team Up purposes). - Baby Geneticists would bypass the cart check when trying to equip ammunitions. - Baby Mechanics would bypass the Mado Gear check when trying to equip ammunitions. - Transcendent Shadow Chasers would lose the Stalkers' ability to clone transcendent skills. Signed-off-by: Haru <haru@dotalux.com>
2016-08-19Renamed some char and inter server variablesHaru1-3/+3
- `int save_log` -> `bool chr->show_save_log` - `bool char_new` -> `bool enable_char_creation` - `int log_char` -> `bool chr->enable_logs` - `int log_inter` -> `bool inter->enable_logs` - `int chr->new_display` -> `int16 chr->new_display` - `int char_aegis_delete` -> `bool char_aegis_delete` Split and improved from Panikon's commit 832fb27d4f767e4bc8b68c432d0da00b7cb7a4f9 Signed-off-by: Haru <haru@dotalux.com>
2016-03-06Replace wrong variable usage in party creation code (closes #1185)Andrei Karas1-3/+4
Also not allow create party with empty or only spaces name.
2016-02-24Removed several unnecessary RFIFOP typecastsHaru1-3/+3
- 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-24Added const qualifier to several variable/argument pointersHaru1-6/+8
- This is necessary for compatibility with a const RFIFOP. Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-08-15HPM compatibility improvementsHaru1-0/+1
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-06-22Fixing party creation failure conditionAncyker1-1/+0
mapif_party_created was incorrectly checking for a null pointer
2015-06-19Cleaned up some #includesHaru1-1/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru1-14/+14
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-06-01Replaced some of the hardcoded values with constants (char)Haru1-6/+7
- Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru <haru@dotalux.com>
2015-04-09Add checks to int_party.cAndrei Karas1-0/+14
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru1-7/+5
- Variable scopes reduced - Parenthesized ambiguous expressions - Removed or added NULL checks where (un)necessary - Corrected format strings - Fixed typos potentially leading to bugs Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Whitespace cleanup (no code changes)Haru1-13/+10
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-11-15Add missing interface initialisations in char server.Andrei Karas1-0/+2
2014-11-15Move global variable into interface in inter.cAndrei Karas1-56/+56
2014-11-15Move global variable into interface in int_party.cAndrei Karas1-15/+15
2014-11-15Add most functions from int_party.c to interfaces.Andrei Karas1-91/+97
2014-11-15Add most functions from char.c to interfaces.Andrei Karas1-10/+11
Introduced interfaces: chr, mapif, loginif.
2014-11-15Add prefix inter_party_ to most functions in int_party.cAndrei Karas1-21/+21
2014-11-15Add prefix char_ to most functions in char.cAndrei Karas1-2/+2
2014-05-30Fixed typos inside src/Shido1-2/+2
2014-05-13Removed trailing whitespace (sources)Haru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-11/+14
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-14/+11
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-09Fixed order of includes in all source filesHaru1-11/+14
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>