Commit graph

1061 commits

Author SHA1 Message Date
Haru
cdca697393 wip on map server 2026-08-15 08:03:49 +02:00
Ibrahim Zidan
d118e31fec
Change all identifiers named delete to delete_ for C++ compatability
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-07-21 02:03:36 +03:00
Ibrahim Zidan
837ce7b9cb
Change all identifiers named class to class_ for C++ compatability
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-07-21 02:03:35 +03:00
Ibrahim Zidan
e97a5e0318
Fix sign comparison mismatch in map-server target
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-07-21 02:03:30 +03:00
Haru
47f734b26c
Fix some potential null-pointer errors reported by gcc-16
Signed-off-by: Haru <haru@dotalux.com>
2026-07-20 02:52:34 +03:00
Haru
927c07bbbe
Fix some linter warnings about wrong indentation
Warnings reported by clangd/clang-tidy

Signed-off-by: Haru <haru@dotalux.com>
2026-07-20 02:52:33 +03:00
AcidMarco
65bc68ba8a Fix stale ground skill tick cache after mob respawn
Ground skill tick checks used DIFF_TICK32() even though timer ticks are int64. After long map-server uptime this could make an old per-target tick entry look like a future tick and skip the ground skill effect.

Natural mob respawn reuses mob_data/unit_data, so clear skillunittick for the next life to avoid carrying per-target ground skill state across deaths.

Fixes #3417.
2026-07-14 14:28:44 +03:00
Ibrahim Zidan
f00c0f910e
Update copyrights for year 2026
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-06-28 21:05:37 +03:00
Ibrahim Zidan
8a194a43c0
Fix random options drop groups doing 0 size allocation when none is set
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-04-22 03:51:07 +02:00
Ibrahim Zidan
717453eef8
Merge branch 'rebalance'
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-04-22 03:35:47 +02:00
Lorenzo Buitizon
2ad40bb9b2
Add removal notice for mob_race2_db in mob.c to inform users about its deprecation and merger into mob_db.
Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
2025-09-10 00:21:21 +08:00
Lorenzo Buitizon
6451f56577
Merged data from mob_race2_db to mob_db.
Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
2025-09-06 14:23:00 +08:00
Haru
2c181a6d4a
Update copyrights for year 2025
Signed-off-by: Haru <haru@dotalux.com>
2025-02-01 00:44:18 +00:00
Guilherme G. Menaldo
ff2a231cfb
Rebalance of BD_RICHMANKIM (Mental Sensing)
Skill reworked:
- It is now a screen-wide skill (31x31) that gives the SC to all party
  members
- It no longer uses ground units nor keeps the "performance running"

- EXP Boost formula changed:
  - Old: +(25 + SkillLv x 11)%
  - New: +(10 + SkillLv x 10)%
- 1s casting time added
- 0.3s global delay added
- 20s cooldown added

From massive skills rebalance (1st/2nd/transclass) (2018.11.28)
2024-06-30 18:00:00 -03:00
Guilherme G. Menaldo
0dc17bbfd8
Change pc_gainexp "is_quest" to a bitmask enum
this allows us to easily expand it with new flags
2024-06-30 17:59:59 -03:00
Guilherme G. Menaldo
02ab21f97f
Fix order of aCalloc parameters in entire src folder
aCalloc should be called with (number of elements, size of each element)
or gcc 14 will warn.
2024-02-10 12:02:05 -03:00
Haru
daca5167ed
Welcome to 2024, Hercules
(update copyright year in headers)

Signed-off-by: Haru <haru@dotalux.com>
2024-02-04 02:26:34 +01:00
Guilherme G. Menaldo
e98bc95d22
Replace all hardcoded messages.conf ids with their msgtable constants 2023-12-29 21:03:18 -03:00
csnv
7fa3dd695b Fixed CELL_NOSTACK making mob ai not being able to reach target under certain conditions 2023-10-31 01:24:01 +01:00
Guilherme G. Menaldo
9b1e93c920
fix issue when changing unit's dmg_taken_rate
database-defined dmg_taken_rate (md->db->dmg_taken_rate) was always being used over
the unit's own setting (md->dmg_taken_rate), this rendered any monster
specifc change for this value be ignored.

This mainly affected setunitdata with UDT_DAMAGE_TAKEN_RATE type.

Always using the unit specific setting allows setunitdata to change it
for spawned monsters as it wishes.
2023-04-21 15:36:13 -03:00
Haru
0453dfe61e
Happy 2023 Hercules
(Update copyright headers)

Signed-off-by: Haru <haru@dotalux.com>
2023-01-13 01:28:09 +01:00
Haru
9babbed619
Merge pull request #3136 from zaid-naim/patch-1
Update mob.c
2022-12-09 00:28:32 +01:00
Haru
e1cd728710
Make the item drop rate bonus configurable and make it affect every drop-time bonuses
The cap only applies to drop-time bonuses (cash shop SCs, race-specific
drop rate modifiers, luk or size custom influence, renewal level
modifiers, etc) and is bypassed by higher values in the mob database's
drop rates and the server's  drop rates.

Signed-off-by: Haru <haru@dotalux.com>
2022-12-08 23:18:13 +01:00
Haru
fdde8c2f6c
Merge pull request #3164 from guilherme-gm/mob_skill_constants
Centralize some config reading function and add support for constants in mob skill db
2022-10-24 23:49:35 +02:00
Guilherme G. Menaldo
1935e35d41 add support for constants in mob_skill_db
this allows val0, val1, val2, val3, val4 and Emotion
fields to use constants available in the script engine,
such as monster name constants, emotion constants, etc
2022-10-12 17:22:31 -03:00
Guilherme G. Menaldo
dd3eb7ed5d replace mob_lookup_const with common map one 2022-10-12 17:22:31 -03:00
skyleo
1e4a16f78a Add skill_id to status->get_sc_def call chain
Will only be used for GTB SC immunity check.
Due to some differences in how we treat SCs or skills in general,
we have to do this check for SCs themselves, in Aegis this is done
differently, but essentially we're resulting in the same behavior.
2022-10-07 21:08:48 +02:00
Haru
8d91b75a66
Fix some cases where the snprintf output might be truncated
Signed-off-by: Haru <haru@dotalux.com>
2022-08-03 21:20:38 +02:00
Haru
9f739ca2bc
Replace use of safesnprintf() with snprintf()
snprintf is part of the C99 standard, which is required by Hercules.

Signed-off-by: Haru <haru@dotalux.com>
2022-08-03 21:20:33 +02:00
Zaid Naim
bab33f1494
Update mob.c
Right now if you try to put 100% drop rate on drops.conf, it will show correctly on @mi and @rates but monsters will not really drop the item 100%. Monsters will only drop 90%. This change fixes that.
2022-04-28 05:49:19 +00:00
Haru
2b4fec0deb
Update copyright headers for 2022
Happy 2022

Signed-off-by: Haru <haru@dotalux.com>
2022-01-05 20:25:22 +01:00
Andrei Karas
f3426a3225 Fix some issues detected by ql checker 2022-01-05 18:25:25 +03:00
Haru
1eadab924c
Fix a regression in the mob drop rate calculation
The value was accidentally always overridden to be 900%

Signed-off-by: Haru <haru@dotalux.com>
2021-11-06 17:41:03 +01:00
Kei
6f7680b47b
Rework the drop rate, bonus drop rate and the drop rate cap.
* PK Enabled, increased drop rate of each item by 25%
* Drop rate bonuses now stack with each other and capped to max of 90%
* Moved drop_rate0item on the end so it can override the existing drop_rate cap.
2021-10-30 06:55:29 +08:00
KeiKun
5401f961cf
Added item bonus2 bDropAddRace. 2021-10-30 06:55:25 +08:00
Asheraf
08bfe8cbe3 Fix mob groups reading rate from wrong object 2021-08-27 13:47:04 +01:00
Haru
ce5f2de06c
Merge pull request #3013 from Asheraf/mob_group
Convert random monster databases to libconfig
2021-08-04 23:48:58 +02:00
Asheraf
416a2952e3 Convert random monster databases to libconfig 2021-07-12 10:10:12 +01:00
Haru
f7695ad411
Tweak code style
Signed-off-by: Haru <haru@dotalux.com>
2021-07-08 04:03:56 +02:00
Haru
0686250572
Fix a memory leak if a clone's view_data is customized
Signed-off-by: Haru <haru@dotalux.com>
2021-07-08 04:03:24 +02:00
Haru
287801e402
Make the mob dynamic viewdata functions static
Signed-off-by: Haru <haru@dotalux.com>
2021-07-08 03:56:15 +02:00
Samuel23
033fb8ee82 Made view_data for mob unit changes persistent
Added null checks
adjust the * to the data name.
Added md->vd != NULL check to prevent memory leaked as verbalized by @4144

Signed-off-by: Samuel23 <johnsamuel_santos3@yahoo.com>
2021-05-26 11:37:08 +08:00
Andrei Karas
35d3ee92c1 Add guard check method and macro for check map locks count 2021-04-26 19:39:58 +03:00
Andrei Karas
ebc380f94e Add missing case values for enums or add exception attributes for whole switch 2021-04-05 17:48:05 +03:00
Haru
a80828d2f3
Merge pull request #2874 from Asheraf/questobjup
Add more options to the quest database
2021-02-09 04:12:04 +01:00
Haru
b86429a190
Merge pull request #2911 from skyleo/map-margin-spawn-fix
Introduce map border for map->search_freecell, fixing dead cell bugs.
2021-02-03 10:15:14 +01:00
Asheraf
935f11ef4f Add support for target monsters level range in quest database 2021-01-16 15:49:11 +01:00
skyleo
e51a3e3021 Rename map->search_freecell to map->search_free_cell since its returning
error-code changed
2021-01-13 19:11:58 +01:00
skyleo
d2faa843c0 Change returning error-code in map->search_freecell 2021-01-13 19:11:21 +01:00
skyleo
d62c38f473 Use enum search_freecell in map->search_freecell calls 2021-01-13 19:11:17 +01:00