Age | Commit message (Collapse) | Author | Files | Lines |
|
This commit ensures that `sd->job` and related variables only contain
MapIDs (i.e. the serverside optimized values, where High Novice is
MAPID_NOVICE | JOBL_UPPER) and are never checked against the
client-based Job Class values.
As a rule of thumb, from now on, when a variable is named `job` or
`jobid`, it is intended to contain a MapID and not a Job Class ID. The
type of such variable shall be an unsigned `uint16` or `uint32`.
To ensure that related third party code is also verified when this
commit is merged, the variable `struct map_session_data::class_ (i.e.
`sd->class_`) is renamed to `job`.
Some issues in related lines are also fixed, including:
- The atcommand `@mount` would not check properly that the requesting
character is a 2nd class Swordsman type.
- `pc->addfame()` would silently accept invalid MapIDs, sending unknown
values to the client (more on this in a subsequent commit).
- `pc->famerank()` would not use the passed job as a bitmask, causing
the caller to have to mask it beforehand (more on this in a
subsequent commit).
- The Soul Linker check in TK_JUMPKICK wasn't future-proof (no harm
caused currently).
- Gunslingers would be able to be targeted by Spiritual Bestowment
(`MO_KITRANSLATION`) and Spiritual Sphere Absorption
(`MO_ABSORBSPIRITS`) due to a faulty check introduced when the
Rebellion class was implemented (causing unintended interaction with
Coins).
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>
|
|
Update party_check_state
|
|
|
|
- missing classes checking.
|
|
missing, ref #1282
|
|
Follow-up to ff75470f7085c3ca23a9b16be43881b6bc953345
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Now Renewal Level Penalty being calculated in pc_calcexp only
- Now Guild Tax is being paid after experience modifiers and not before
- Now Experience modifiers being calculated in right way as in aegis (Race modifiers -> PK modifiers -> Premium modifiers -> Buff modifiers)
|
|
|
|
- The argument was redundant, since the passed value is always the same
as the passed string's length (it doesn't make sense otherwise).
The argument is implicit now. Less typing and less errors.
- Affected functions: `clif->bg_message()`, `bg->send_message()`,
`party->send_message()`, `guild->send_message()`.
Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
INFINITE_DURATION, INVALID_TIMER, SC_NONE, INDEX_NOT_FOUND, depending on context.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- This is necessary for compatibility with a const RFIFOP.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Replaced casts in foreach callbacks.
- Added assertions and nullpo checks where applicable.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
|
|
- Changed the hplugin_data_store's array into a VECTOR.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- 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>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
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>
|
|
- Include directives are now directory-independent.
- This will allow building plugins from other directories in future.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- 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>
|
|
Servers can now run on any number of languages, without editing npc files.
Designed by Haruna and Ind
http://hercules.ws/board/topic/8687-hercules-ultimate-localization-design/
Signed-off-by: shennetsind <ind@henn.et>
|
|
- 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>
|
|
|
|
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>
|
|
Implemented official party-leader-changed-packet
Special Thanks to kyeme!
http://hercules.ws/board/tracker/issue-8293-change-party-leader/
Signed-off-by: shennetsind <ind@henn.et>
|
|
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
|
|
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3.
Fixes issue 8184
http://hercules.ws/board/tracker/issue-8184-cart-related/
|
|
- 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>
|
|
Signed-off-by: shennetsind <ind@henn.et>
|
|
- More info on the forums, at
http://hercules.ws/board/topic/4428-michierus-renewal-update/
Signed-off-by: Haru <haru@dotalux.com>
|
|
As requested by the community in http://hercules.ws/board/topic/3832-hpm-custom-data-struct-for-instance-data-guild-data-and-party-data/
Signed-off-by: shennetsind <ind@henn.et>
|
|
equivalent macros
Because 2/3 jumps to perform such a operation is just awful
Signed-off-by: shennetsind <ind@henn.et>
|
|
Special Thanks to Haru
Signed-off-by: shennetsind <ind@henn.et>
|
|
- improved @makehomun -1 so that if the homun data hasnt been loaded it is requested.
- instances of private types (party/guild/char) no longer create channels, however global types still does (IOT_NONE).
- Fixed an issue with party/guild instance data not being freed when either is destroyed (Special Thanks to Yommy).
Signed-off-by: shennetsind <ind@henn.et>
|
|
Special Thanks to Haruna
Signed-off-by: shennetsind <ind@henn.et>
|
|
Signed-off-by: shennetsind <ind@henn.et>
Conflicts:
conf/messages.conf
src/common/mmo.h
src/map/pc_groups.c
src/map/pc_groups.h
|
|
|
|
Enabled Party/Guild joining methods, Implements first attempt at the splitting algorithm (Thanks to jaBote!)
Checks item 1 on issue #69
Help us test! -- http://hercules.ws/board/topic/1302-bg-queue-debug/
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Added a command line argument '--script-check' to check a script's
syntax without running the server (and without requiring a SQL
connection). Usage: ./map-server --script-check /path/to/the/script.txt
- For convenience, a script-checker bash script is provided, to set the
path correctly when called from a different directory. Usage:
/path/to/Hercules/script-checker /path/to/the/script/to/check.txt
- While the script checker will supposedly work under windows as well,
no convenience scripts are currently provided for platforms other than
UNIX (feel free to open a pull request with a .bat launcher or
whatever you like)
- Integration with IDEs or text editors is possible. In fact, I already
have a fully functional plugin for vim (through vim-syntastic), and if
there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD
- If you want an online checker, http://haru.ws/scriptchecker/ is
running this code, without modifications and will be kept up to date
(without any warranty though.)
- Special thanks to Ind, Yommy, Streusel, who helped making this
possible, in a way or another.
|
|
Im pretty sure its on the clif.c
Signed-off-by: sevenzz23 <sevenzz23@yahoo.com>
|
|
- This fixes an issue with timers that stop working after about 24-49
days when the tick overflows (note that this may happen much earlier
than that, and at hard to predict times, on some systems)
- Updated the RDTSC help message in the configure script to also warn
users about issues with SpeedStep enabled systems.
- On Windows, tick() still has a resolution of 10~15ms (or even as low
as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added
for a follow-up patch, as I want this one to be as small as possible)
- Note: on Windows versions earlier than 6.x (Vista, Server 2008), the
tick overflow issue is NOT fixed, since they don't support the
function used to retrieve a 64 bit tick. This isn't a big issue, since
those platforms are already - or going soon to be - out of their
extended support period, and it's already advisable to upgrade, for
other reasons. If you're the unfortunate user of such a system, it is
recommended that you reboot your machine at least once every 49 days
for Hercules to work reliably.
- Note: To clear some doubts, since I've already been asked, this has
absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about
a variable's size, not the size of registers of your CPU, and your
32bit CPU will be able to handle this just fine.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Adjusted PARTY_RECRUIT accordingly, special thanks to ossi0110 for bringing it up.
Signed-off-by: shennetsind <ind@henn.et>
|