summaryrefslogtreecommitdiff
path: root/src/char/char.c
AgeCommit message (Collapse)AuthorFilesLines
2018-12-14Add inventory size field into db and using it in server.Andrei Karas1-5/+28
2018-12-12Fix issue with chars list if number of chars is 3*N chars.Andrei Karas1-18/+35
Also introduced header file with HC packet structs.
2018-12-12Add validation for buffer size in char_mmo_char_tobuf.Andrei Karas1-3/+6
And use correct MAX_CHAR_BUF
2018-11-15Merge pull request #2321 from 4144/packetlenHaru1-7/+10
Add complete packet len table
2018-11-14Add send packet validation for connections between server and clients.Andrei Karas1-7/+10
2018-11-13Add the available information to the charlog when selecting a characterHaru1-2/+13
All the necessary information was already available (the full character data is loaded by `char_parse_char_select()`), but it wasn't used by the charlog insert query. Signed-off-by: Haru <haru@dotalux.com>
2018-11-13Add the available information to the charlog when renaming a characterHaru1-3/+14
All the necessary information was already available (charlog fields are part of the shortdata, which is already loaded by `char_rename_char_sql()`), but it wasn't used by the charlog insert query. Signed-off-by: Haru <haru@dotalux.com>
2018-11-13Merge pull request #2310 from 4144/updatepacketsHaru1-14/+13
Update packets and messages up to 2018-11-07
2018-11-07Improve packet version check for packet 0x82d.Andrei Karas1-14/+13
2018-10-22add an option to prevent from renaming a character if they are in a guild or ↵gumi1-0/+10
party closes #1805
2018-07-24Implemented Title System.Dastgir1-4/+9
2018-07-24Implementation of the official Achievement System.smokexyz1-2/+12
Source: http://ro.gnjoy.com/news/update/View.asp?seq=163&curpage=1 Script Commands - ``` achievement_progress(<ach_id>,<obj_idx>,<progress>,<incremental?>{,<char_id>}); ``` Includes an achievement_db.conf generator that reads from the item_db, mob_db (server side) and achievement_list.lub files to determine valid achievement entries based on item/monster availability. Achievements containing unsupported entries are commented out. This feature, although renewal-only in official servers, is capable of being used in pre-renewal mode on Hercules. Does not include the title system yet. A big thanks to - @MishimaHaruna for constantly reviewing. @4144 for all the support. @Asheraf for a lot of official information. Co-authored-by: "Dastgir" <dastgirp@gmail.com>
2018-07-17Replace item id shorts to int in char server.Andrei Karas1-17/+17
2018-07-12Remove useless code from char_send_map_info.Andrei Karas1-3/+1
2018-07-01Change functions to static where possible (Part 3 - char)Haru1-214/+233
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
2018-06-30Move some non-mapif functionality from the mapif interface to the inter/char ↵Haru1-29/+66
interfaces Signed-off-by: Haru <haru@dotalux.com>
2018-06-30Move some non-mapif functionality from the mapif interface to the ↵Haru1-1/+1
inter_homunculus interface Signed-off-by: Haru <haru@dotalux.com>
2018-06-30Move some non-mapif functionality from the mapif interface to the ↵Haru1-2/+2
inter_guild interface Signed-off-by: Haru <haru@dotalux.com>
2018-06-30Move some non-mapif functions from the mapif interface to the ↵Haru1-1/+1
inter_elemental interface Signed-off-by: Haru <haru@dotalux.com>
2018-06-30Move mapif functions from char.c to mapif.cHaru1-149/+0
Signed-off-by: Haru <haru@dotalux.com>
2018-06-29Add new field into packet char_send_map_info.Andrei Karas1-2/+11
But unused for now.
2018-06-13Fix job field size in function char_parse_char_create_new_char.Andrei Karas1-1/+1
2018-04-22Remove the stat-reporting mechanismHaru1-45/+1
Signed-off-by: Haru <haru@dotalux.com>
2018-04-22Merge pull request #2007 from Jedzkie/PincodeUpdateHaru1-1/+3
Pincode Update
2018-04-07Implementation of Attendance systemAsheraf1-4/+7
2018-04-06Add support for packet 0xaf7 in zero clients.Andrei Karas1-1/+1
2018-04-02Pincode UpdateJedzkie1-1/+3
- Added blacklist feature - Added official message when successfully create a pincode / successfully change a pincode
2018-03-29Simplify version checks with new packet version defines.Andrei Karas1-1/+1
2018-03-11Fix packet character name request reply for 20180221 clients.Andrei Karas1-0/+5
2018-02-10Clean up trailing whitespace and non-indent tabsHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2018-01-25Implementation of Official Clan SystemMurilo Pereti Tavares1-4/+9
All official features work including the autokick for inactive members And the system is completely customizable.
2017-11-25correct wrong conf file path in showerrorAsheraf1-1/+1
2017-11-18Pass the correct types and sizes to the StmtBind functionsHaru1-147/+152
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-09-21Change char server packets for 20170830 and newer clients.Andrei Karas1-7/+20
2017-09-19remove trailing whitespaces from sourcegumi1-1/+1
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-07-30Implementation of RoDEXKirieZ1-0/+4
2017-07-17Merge pull request #1760 from Smokexyz/memitemtosql-fixHaru1-223/+240
Optimisation of char_memitemdata_to_sql()
2017-07-05Optimisation of char_memitemdata_to_sql()smokexyz1-223/+240
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-05-31Fix a race condition when saving the storage on logoutHaru1-4/+0
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-29Fix memory leak in storage item vector (Fixes #1751)Andrei Karas1-1/+1
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz1-13/+7
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/IROHaru1-9/+42
Implementation of Item Options System.
2017-04-04Implementation of Item Options System.Smokexyz1-9/+42
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.Dastgir1-16/+28
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.