Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
Signed-off-by: HerculesWSAPI <dev@herc.ws>
|
|
Implementation of Item Options System.
|
|
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)
|
|
|
|
- kRO Mains recently increased their character slots from 11 to 12.
|
|
When the server is called with a plugin-defined argument expecting
additional values, in the form '--foo bar', the parser is unable to
skip the additional value until the plugin is fully loaded.
The issue was caused by the first scans of the argument list to find
CMDLINE_OPT_PREINIT or CMDLINE_OPT_SILENT arguments, which happen before
plugins are loaded, and would cause the parser to choke on the
additional values, interpreting them as separate arguments.
This is related to PR #1552, where we attempted to use this option for
the first time.
Signed-off-by: Haru <haru@dotalux.com>
|
|
strings
Signed-off-by: hemagx <ibrahem.h.basyone@gmail.com>
|
|
Signed-off-by: HerculesWSAPI <dev@herc.ws>
|
|
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>
|
|
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>
|
|
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>
|
|
This introduces the macro `STATIC_ASSERT(ex, msg)`, that works like its
C11 counterpart `_Static_assert(ex, msg)`, on compilers that support it.
Support is provided, depending on the compiler:
- When in C11 mode, use the native `_Static_assert`
- If the compiler advertises having the `c_static_assert` feature, use
`_Static_assert` (according to the clang documentation).
- If the compiler is GCC >= 4.7 (tested to be compatible), use
`_Static_assert` (nonstandard extension, C11 feature available in C99).
- If the compiler is MSVC (all the currently supported versions have
been tested to be compatible), then use `static_assert` (nonstandard
extension, C++ feature)
- Otherwise, define it as a no-op macro.
Signed-off-by: Haru <haru@dotalux.com>
|
|
As we use int64 (instead of long long int) through the code, it's
preferable if our libconfig interface does the same, avoiding us to
create temporary interchange variables for that purpose.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Fixed copyright year for 2016
|
|
|
|
|
|
|
|
2015-12-16
Added New Char Creation Packet(0xa39).
Added Placeholder of JOB_SUMMONER
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Plugins were accidentally using the core's memory manager instead of
the HPM-safe wrappers.
- As a side-effect of this, plugins shall not be able to hook into the
iMalloc interface.
- The issue was introduced in e7c2f7d827ad286dc826e483391e64b8ffe2720b
Signed-off-by: Haru <haru@dotalux.com>
|
|
human-reader-) friendly
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
instead of 4.5
- The support on GCC 4.5 is incomplete, and in order to build Hercules,
GCC >= 4.6 is recommended
Signed-off-by: Haru <haru@dotalux.com>
|
|
Some possible buffer overflows.
Add attribute for mark fallthrough cases.
Skipped libconfig warnings.
|
|
- Since f8edb93a (likely caused by a find and replace macro gone
horribly wrong)
Signed-off-by: Haru <haru@dotalux.com>
|
|
Plugin settings should be relative to the the libconfig file root. For
example, a configuration setting of type HPCT_CHAR will be relative to
the root of conf/char/char-server.conf. In order to add a configuration
entry inside the char_configuration block, the full configuration path
(slash-delimited) should be passed to addCharConf(), as in the
following example:
`addCharConf("char_configuration/my_setting", my_parser_function);`
Signed-off-by: Haru <haru@dotalux.com>
|
|
Previously, it'd say "[Error] (null):0 - file I/O error"
Signed-off-by: Haru <haru@dotalux.com>
|
|
When a setting optional, no warning is issued on the console when said setting is not found in the config
Signed-off-by: Haru <haru@dotalux.com>
|
|
Ported to modern Hercules and cleaned up from Panikon's commits: 44fea0b3cdba6901599265220228ba4359b1f96d, 9cba05bc0811e638bbaaa6cff887d0b2c9872560
Signed-off-by: Haru <haru@dotalux.com>
|
|
Ported to modern Hercules and cleaned up from Panikon's commits: b10f2a88073882bea812c6278fdec7848102ab87, bc5007299a92898ea4630f2a977d9a1b42b6c145
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Ported to modern Hercules and cleaned up from Panikon's commits: 40f9ec33868e2240cab013308897898ed252b3e0, a9d646da19e25ab6fcf44dbd1ae7d90c30f6686c, 1aa8581a0aecbfd53e877686c399ffb731dcd75e, 72c645b015ae6130ca7d4309d0fb1413340e7f23, f8c906a0496b9acdae1d8244b1544fa03592061e, 51d88a58983c9552dfd1a0f059e5a031742aed61, 443684b3c77f4c32fe7877a7f8d62debf73b1e93, cf93eafef1f322cd1583226272b7d4008f562da4
Signed-off-by: Haru <haru@dotalux.com>
|
|
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>
|
|
|