summaryrefslogtreecommitdiff
path: root/src/common/mmo.h
AgeCommit message (Collapse)AuthorFilesLines
2018-01-25Implementation of Official Clan SystemMurilo Pereti Tavares1-1/+56
All official features work including the autokick for inactive members And the system is completely customizable.
2017-12-17Merge pull request #1923 from 4144/fixpacketsHaru1-0/+7
Add support for Ragnarok zero clients, split packets.h again
2017-12-08Merge pull request #1898 from Asheraf/homunafHaru1-0/+1
implement homunculus autofeeding for 2017 clients
2017-12-02Add configure option --enable-packetver-zero for enable support for zero ↵Andrei Karas1-0/+7
clients.
2017-11-18Implement Homunculus autofeedingAsheraf1-0/+1
2017-11-05Reduce confusion between skill IDs and skill DB indexes (part 2)Haru1-3/+7
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 names for some unnamed enums.Andrei Karas1-2/+2
Need for packet parser.
2017-10-21Add rodex 2017 packets.Andrei Karas1-0/+5
2017-09-21Change char server packets for 20170830 and newer clients.Andrei Karas1-1/+1
2017-09-17Move other view-related variables to `sd->status.look`Haru1-4/+6
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-1/+1
`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-1/+3
`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-17Split 'View' in two different fields in the item databaseHaru1-0/+1
- The field was used both for sprite view IDs and for weapon or ammunition subtypes. Now the fields 'ViewSprite' and 'Subtype' are used respectively. Signed-off-by: Haru <haru@dotalux.com>
2017-07-30Implementation of RoDEXKirieZ1-0/+47
2017-05-27Merge pull request #1722 from Smokexyz/mmo_charstatus-fixHaru1-3/+5
Dismemberment of `storage_data` from `mmo_charstatus`.
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz1-3/+5
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-23Coding-style Fixes and White space adjustmentsJedzkie1-1/+1
2017-04-19Implemented Official Summer 2 CostumeJedzkie1-1/+2
Added summer2_ignorepalette configuration
2017-04-09Merge pull request #1598 from Smokexyz/IROHaru1-0/+12
Implementation of Item Options System.
2017-04-04Implementation of Item Options System.Smokexyz1-0/+12
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-16Increase Character Slots from 9 to 12Jedzkie1-1/+9
- kRO Mains recently increased their character slots from 11 to 12.
2016-12-03Add function to retrieve the appropriate fame list type for a job mapidHaru1-0/+1
This commit adds the function `pc->famelist_type()` to retrieve the appropriate fame list for a given job (common operation). When the given job ID doesn't have an appropriate fame list, the newly introduced value RANKTYPE_UNKNOWN is returned. Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Clarify some Job Class vs MapID confusion (1/2)Haru1-3/+5
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-12-03Clarify the meaning of the MAPID_* constantsHaru1-6/+6
The enum values are now written in a more explicit way, showing how they're composed (upper mask + base job). A future-proof static assertion is added, to make sure the base jobs won't overlap the upper masks. Signed-off-by: Haru <haru@dotalux.com>
2016-10-22Increases MAX_SKILL to occupy Summoner SkillsDastgir Pojee1-1/+1
2016-10-22Added Packets for Several Clients: 2015-10-01, 2015-10-29, 2015-11-04 andDastgir Pojee1-0/+2
2015-12-16 Added New Char Creation Packet(0xa39). Added Placeholder of JOB_SUMMONER
2016-08-19Ported char-server.conf to libconfigHaru1-4/+2
Fixed issue: 8115, now start items can be equipped as well Ported to modern Hercules and cleaned up from Panikon's commits: c6482e9870645ffe59a6a059b819574d4ac79fd9, 832fb27d4f767e4bc8b68c432d0da00b7cb7a4f9, f81b579899e3a15bd472ca8c6a6e0116c43bec92, e23723725499b617def03d05661eca637edaeabd, 0b783a83d82e588efd760f7f4baec0c8074a6fd1, 1b7de91308a57ea07b158ed95a2515a3c8cc36bd, 677d3430cbda0962b320a60cf499e9dadf637d00 Signed-off-by: Haru <haru@dotalux.com>
2016-07-14Changed mmo_charstatus::status_point and mmo_charstatus::skill_point to intHaru1-1/+1
Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
2016-07-14Changed mmo_charstatus::base_level and mmo_charstatus::job_level to intHaru1-1/+1
Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
2016-06-30Use item attribute as flags varible. Now only ATTR_BROKEN flag exists.Andrei Karas1-0/+5
2016-06-30Add #ifndef for different constants in mmo.hAndrei Karas1-0/+68
2016-04-16Rewrite client interface for login server (part 1)hemagx1-6/+1
Rewritten incoming/outgoing packet handlers to use structs instead of manipulating the WFIFO buffer bytes directly Signed-off-by: Haru <haru@dotalux.com>
2016-03-21Update Max Zeny to official value 2,147,483,647hemagx1-1/+1
closes #1213
2016-03-09Corrected some issues in the item data saving functionHaru1-0/+4
- Unique ID could get duplicated (resulting in an apparent item duplication, while it's only unique ID corruption). Fixes #1191 - Removed duplicated code (char_inventory_to_sql, being an almost exact clone of char_memitemdata_to_sql) Signed-off-by: Haru <haru@dotalux.com>
2016-03-06Check allowed range for "View" field in item_db for weapon items.Andrei Karas1-1/+2
Also fix some array sizes.
2016-02-28Changed mob mode field to 32 bit, for future expansionHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-02-27Corrected wrong variable type of struct status_change_data::tickHaru1-4/+6
- The variable should be signed, since it uses the value -1 to indicate infinite duration (and it's stored as signed in the database). - Added #define for the special value -1 (INFINITE_DURATION). - This fixes an issue causing status changes to fail being saved to database (thanks to Michi for reporting it). - Related to commit 8dc75721. Signed-off-by: Haru <haru@dotalux.com>
2016-01-31Move P2PTR Macro to socket header and split the macro into two macros for ↵hemagx1-0/+5
WFIFO/RFIFO. Change packet database enums to defines in mmo.h
2016-01-14Adjusted names in enum guild_permission to still make sense when additional ↵ultramage1-1/+2
custom permissions are added.
2016-01-12Replaced 22-bit mask entry with a regular uint32 in the noviewid mapflag ↵Haru1-0/+1
implementation As per ultramage's suggestion in #926 Signed-off-by: Haru <haru@dotalux.com>
2016-01-09Added support for MC_CARTDECORATE skill.Jedzkie1-5/+11
*This skill is supported only by 2015-08-05aRagexeRE clients onwards.* Closes #1025 as merged Signed-off-by: Haru <haru@dotalux.com>
2016-01-05Added Support for BodyStyleDastgir1-1/+1
Closes #974 as merged
2015-12-28Added elemental_id enum, replaced numeric elemental IDs with enum membersHaru1-3/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Added merc_id, replaced numeric mercenary IDs with enum membersHaru1-1/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Added homun_id enum, replaced numeric constants with enum membersHaru1-3/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-12-22Add a source constant SCRIPT_VARNAME_LENGTHAnnieRuru1-0/+2
since we can freely adjust the length of the variable name just edit this value and edit in main.sql
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-02Fixed compile errors on very old PACKETVERsHaru1-2/+4
- Fixes #903 and other similar problems Signed-off-by: Haru <haru@dotalux.com>
2015-10-11Cleanup of the HPluginData implementation (second part)Haru1-3/+1
- Changed the hplugin_data_store's array into a VECTOR. Signed-off-by: Haru <haru@dotalux.com>
2015-10-11Cleanup of the HPluginData implementation (First part)Haru1-3/+2
- Several explicit casts are removed, to have a slightly better type-checking at compile time. - A destructor function is provided, to remove code duplication. Signed-off-by: Haru <haru@dotalux.com>