summaryrefslogtreecommitdiff
path: root/src/char
AgeCommit message (Collapse)AuthorFilesLines
2018-03-11Merge pull request #1987 from guilherme-gm/rodexfixesHaru3-27/+39
Some rodex fixes
2018-03-11Fix packet character name request reply for 20180221 clients.Andrei Karas1-0/+5
2018-03-08Fixed a nullpo error when user tried to do an action in an unloaded mail in ↵Guilherme G. Menaldo3-8/+10
rodex
2018-03-08Fixed RoDEX mail return not working correctlyGuilherme G. Menaldo1-19/+29
2018-03-08Add missing checks into pincode packets.Andrei Karas1-0/+6
2018-03-08Disconnect player from server after he enter too many wrong pincodes.Andrei Karas1-1/+3
2018-02-27Ignore invalid pincode.Andrei Karas1-2/+5
2018-02-20Dont show password and pincode in @accinfo gm command.Andrei Karas1-0/+3
This need for better security.
2018-02-10Clean up trailing whitespace and non-indent tabsHaru2-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2018-02-10Fix some minor issues in the clan system, as reported by coverityHaru1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2018-01-25Implementation of Official Clan SystemMurilo Pereti Tavares8-7/+244
All official features work including the autokick for inactive members And the system is completely customizable.
2017-12-28Fixed rodex loading mails when it requires multiple packets.Guilherme Guiguer Menaldo1-8/+12
2017-12-10Merge pull request #1913 from Asheraf/errorHaru1-1/+1
correct wrong conf file path in showerror
2017-12-08Merge pull request #1898 from Asheraf/homunafHaru1-6/+7
implement homunculus autofeeding for 2017 clients
2017-11-27Fix an item loading failure in RODEXHaru1-22/+24
Caused by a wrong ordering of SQL operations (StmtExecute after StmtBindColumn) introduced in e5a63561bba9d09e5a88636f4982cdb2cf57a569. Fixes #1912 Signed-off-by: Haru <haru@dotalux.com>
2017-11-25correct wrong conf file path in showerrorAsheraf1-1/+1
2017-11-18Implement Homunculus autofeedingAsheraf1-6/+7
2017-11-18Correct an issue in the RODEX when MAX_SLOTS or MAX_ITEM_OPTIONS have custom ↵Haru1-68/+80
values
2017-11-18Pass the correct types and sizes to the StmtBind functionsHaru5-208/+216
Fixes #1531 (and other similar issues) Signed-off-by: Haru <haru@dotalux.com>
2017-11-05Reduce confusion between skill IDs and skill DB indexes (part 2)Haru1-5/+5
Remove MAX_SKILL in favor of MAX_SKILL_DB, when referring to the maximum skill DB index. This is opposed to MAX_SKILL_ID, the maximum skill ID. Signed-off-by: Haru <haru@dotalux.com>
2017-10-21Add rodex 2017 packets.Andrei Karas1-0/+24
2017-09-21Change char server packets for 20170830 and newer clients.Andrei Karas1-7/+20
2017-09-19remove trailing whitespaces from sourcegumi4-9/+9
2017-09-17Move other view-related variables to `sd->status.look`Haru1-17/+17
The following variables are now moved to `sd->status.look` (from `sd->status`): `head_top`, `head_mid`, `head_bottom`, `robe` Signed-off-by: Haru <haru@dotalux.com>
2017-09-17Differentiate variables that hold a ViewSprite and a Subtype (part 2)Haru1-5/+5
`sd->status.shield` is renamed to `sd->status.look.shield` and only holds ViewSprite IDs. Its previous other meaning is now transferred to `sd->has_shield`, of boolean type (to detect the presence of a shield) Signed-off-by: Haru <haru@dotalux.com>
2017-09-17Differentiate variables that hold a ViewSprite and a weapon SubtypeHaru1-5/+5
`sd->status.weapon` is renamed to `sd->status.look.weapon` and only holds ViewSprite IDs. Its previous other meaning is now transferred to `sd->weapontype` (holding the currently equipped weapon type, considering both hands at once) Signed-off-by: Haru <haru@dotalux.com>
2017-09-12Fix several typos and grammar mistakesHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2017-08-08Fix hpm issues after rodex commit.Andrei Karas3-3/+3
2017-07-30Implementation of RoDEXKirieZ9-3/+627
2017-07-27Fix possible buffer overflows with snprintf.Andrei Karas1-1/+1
2017-07-17Merge pull request #1760 from Smokexyz/memitemtosql-fixHaru3-225/+243
Optimisation of char_memitemdata_to_sql()
2017-07-05Optimisation of char_memitemdata_to_sql()smokexyz3-225/+243
Implements the storage saving algorithm for inventory, cart and guild storage tables. Total queries to a table in any call would be no more than 4 per call, replacing the original algorithm that could make a lot more through single update queries per call. This significantly reduces the run time speed for saving/loading of item data from the game server.
2017-06-03Add packet 0xac5 for clients >= 20170329.Andrei Karas1-7/+14
2017-06-02Fix replace statement formatting in storage save function.smokexyz1-3/+3
2017-05-31Fix a race condition when saving the storage on logoutHaru3-82/+18
The storage data is no longer cached in the char server. This removal doesn't cause any performance loss, since the cached data was refreshed (loaded from the database) after every save operation. This commit moves the load at the beginning of the save rather than at the end, and discars the cached copy after the save is completed. Related to #1754 Signed-off-by: Haru <haru@dotalux.com>
2017-05-30Merge pull request #1756 from Smokexyz/mmo_charstatus-fixsmokexyz1-7/+6
Fix storage saving checks and amount update.
2017-05-30Fix storage saving checks and amount update.smokexyz1-7/+6
Special thanks to @MishimaHaruna for the fix.
2017-05-29Fix memory leak in storage item vector (Fixes #1751)Andrei Karas3-1/+16
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz6-49/+345
Remove loading and saving of storage_data through char.c Re-declaration of structure storage_data as a vector. Re-code of portions in the map-server using storage_data. A new approach is taken by saving the loaded storage data from sql into memory for the duration of the session, thereby removing the need of querying the database to re-load all items everytime a storage save routine is issued from the map-server. Saving of storage items is done through a new function that significantly reduces the number of queries compared to char_memitemdata_tosql(), and therefore run-time speed. This method potentially reduces the number of update and delete queries from MAX_STORAGE (which could be >= 600) times to literally 1. Storage items are stored in a dynamically allocated array and handled accordingly. struct mmo_charstatus size reduces by 34,800 bytes. Update pc_checkitem() with masks for item checks. `sd->state.itemcheck` has been changed to `sd->itemcheck` of type `enum pc_checkitem_types` `battle/items.conf` has been updated to reflect configuration changes. Further updates to assert a successful reception of storage data in related functions.
2017-04-14Fix compilation warning in char.cAndrei Karas1-1/+3
2017-04-09Merge pull request #1598 from Smokexyz/IROHaru4-54/+153
Implementation of Item Options System.
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-04-04Implementation of Item Options System.Smokexyz4-54/+153
Allows the infusing of equipments with bonus item options. This feature is constrained to clients of packet versions greater than or equal to `20150226`. Item Options and their effects are defined server-side in `db/item_options.conf` and client side in `data/luafiles514/lua files/datainfo/addrandomoptionnametable.lub` The ID of the option must tally with the correct index of the description provided in the client side lua file to avoid bugs. IT_OPT_* keys and MAX_ITEM_OPTIONS macro are also exported from the source as constants. An additional flag `disable_options` has been added to sql, and as `DisableOptions: true/false (boolean, defaults to false !!for equipments only!!)` to item_db.conf files. Script commands documentation is also included. SQL file updates are included. Credits: [Smokexyz](https://github.com/Smokexyz) Style and Script Fixes by [Asheraf](https://github.com/Asheraf) Initial design Idea by [secretdataz](https://github.com/secretdataz)
2017-03-21Add support for sex based character creation for 2015-10+ clients.Dastgir2-17/+29
Allow select for new char gender and human or doram class. Doram starting point not implimented. Based on ragemu commit: commit 5d618a64b041341a48ce24a92633a6a2dcf5af4f Author: Dastgir <dastgirp@gmail.com> Date: Sun Jun 12 22:11:51 2016 +0530 Added Support for Sex Based Character Creation for 2015-10+ clients.
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)Haru7-71/+71
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-11-19Extend the previous linker library order fix to other makefilesHaru1-3/+3
This also fixed a typo (misplaced parentheses around LIBCONFIG_OBJ) in the *_DEPENDS variable of makefiles Signed-off-by: Haru <haru@dotalux.com>