Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of Map Zones #8100

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
39f6e14
Initial implementation of Map Zones
aleos89 Jan 12, 2024
e60e3e8
Fixes CI errors
aleos89 Jan 12, 2024
004dcf5
More battle_config cleanups
aleos89 Jan 12, 2024
82e362e
Fixes PK damage calculation
aleos89 Jan 12, 2024
997e457
Update messages for other languages
aleos89 Jan 12, 2024
c186c03
Fix Russian specifier to integer
aleos89 Jan 12, 2024
5c24cc4
Disable mapflags on custom scripts
aleos89 Jan 12, 2024
7717070
Translate new messages to Spanish
aleos89 Jan 13, 2024
1e4a219
Implements mapflag MF_FLEE_PENALTY
aleos89 Jan 14, 2024
6568ccf
Cleanup atcommand mapinfo
aleos89 Jan 14, 2024
e405a39
Fixes incorrect message display
aleos89 Jan 14, 2024
53b2a0c
Remove deprecated databases from file move
aleos89 Jan 14, 2024
08068bf
Remove plurality
aleos89 Jan 14, 2024
31cc8c5
Adds a function to assist with PK damage
aleos89 Jan 14, 2024
e3eefb6
Fixes invincible timer check
aleos89 Jan 14, 2024
34065e4
Map Zone parsing optimizations
aleos89 Jan 16, 2024
772c6f3
Invincible timer clean
aleos89 Jan 16, 2024
e9beffe
Adds object type check to isStatusDisabled
aleos89 Jan 16, 2024
941085e
Adds ability to clear mapflags
aleos89 Jan 17, 2024
c178f03
Convert s_map_zone_data storage to shared_ptr
aleos89 Jan 17, 2024
e34973a
Fixes mapflag parsing
aleos89 Jan 17, 2024
4a48b64
Fixes MF_FLEE_PENALTY parsing
aleos89 Jan 17, 2024
10e28ba
Add empty zone notice
aleos89 Jan 17, 2024
cbe0d8f
Adds translation for Portuguese
aleos89 Jan 17, 2024
d3ea299
Remove unused battle configs
aleos89 Jan 17, 2024
fc3cc3c
Fixes atcommands for PvP and GvG toggle
aleos89 Jan 18, 2024
f56c45c
Revert PvP/GvG atcommands
aleos89 Jan 23, 2024
fc7a553
Maps in order
Atemo Feb 9, 2024
9973a89
Corrected the zone of few maps
Atemo Feb 9, 2024
1e4c6ff
Merge branch 'master' into feature/map_zones
aleos89 Apr 16, 2024
b43cd4c
Merge branch 'master' into feature/map_zones
aleos89 May 3, 2024
61b7f33
Resolve compile errors and warnings
aleos89 May 3, 2024
849f1ec
Merge branch 'master' into feature/map_zones
aleos89 May 3, 2024
060629b
Adjust structs to classes
aleos89 May 3, 2024
074fdfb
Refactor a few functions to use sd lookup
aleos89 May 3, 2024
477c845
Clean ups from review
aleos89 May 7, 2024
92b6879
Fixes a compile error
aleos89 May 7, 2024
6ffcedc
Merge branch 'master' into feature/map_zones
aleos89 May 7, 2024
c62395f
Cleanups and optimizations
aleos89 May 7, 2024
2553658
Merge branch 'master' into feature/map_zones
aleos89 May 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions conf/battle/battleground.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,6 @@
// assume unit types (1: Pc, 2: Mob, 4: Pet, 8: Homun, 16: Mercenary, 128: NPC, 512: Elemental)
//--------------------------------------------------------------

// Melee damage adjustments (non skills) for Battleground maps (Note 2)
bg_short_attack_damage_rate: 80

// Ranged damage adjustments (non skills) for Battleground maps (Note 2)
bg_long_attack_damage_rate: 80

// Weapon skills damage adjustments for Battleground maps (Note 2)
bg_weapon_attack_damage_rate: 60

// Magic skills damage adjustments for Battleground maps (Note 2)
bg_magic_attack_damage_rate: 60

// Misc skills damage adjustments for Battleground maps (Note 2)
bg_misc_attack_damage_rate: 60

// Flee penalty on BG grounds.
// NOTE: It's %, not absolute, so 20 is -20% of your total flee
bg_flee_penalty: 20

// Interval before updating the bg-member map mini-dots (milliseconds)
bg_update_interval: 1000

Expand Down
19 changes: 0 additions & 19 deletions conf/battle/guild.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,6 @@ guild_max_castles: 0
// Note: This was changed in renewal in favor of individual skill cooldown.
guild_skill_relog_delay: 300000

// Melee damage adjustments (non skills) for WoE battles (Guild Vs Guild) (Note 2)
gvg_short_attack_damage_rate: 80

// Ranged damage adjustments (non skills) for WoE battles (Guild Vs Guild) (Note 2)
gvg_long_attack_damage_rate: 80

// Weapon skills damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
gvg_weapon_attack_damage_rate: 60

// Magic skills damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
gvg_magic_attack_damage_rate: 60

// Misc skills damage adjustments for WoE battles (Guild Vs Guild) (Note 2)
gvg_misc_attack_damage_rate: 60

// Flee penalty on gvg grounds. Official value is 20 (Note 2)
// NOTE: It's %, not absolute, so 20 is -20% of your total flee
gvg_flee_penalty: 20

// Can the 'Glory of Guild' skill be learnt in the Guild window,
// and does changing emblems require it? (Note 1)
// P.S: This skill is not implemented on official servers
Expand Down
8 changes: 0 additions & 8 deletions conf/battle/misc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ pk_min_level: 55
// players to let them attack each other. 0 disables said limit.
pk_level_range: 0

// For PK servers. Damage adjustment settings, these follow the same logic
// as their WoE counterparts (see guild.conf)
pk_short_attack_damage_rate: 80
pk_long_attack_damage_rate: 70
pk_weapon_attack_damage_rate: 60
pk_magic_attack_damage_rate: 60
pk_misc_attack_damage_rate: 60

// Display skill usage in console? (for debug only) (default: off) (Note 3)
skill_log: off

Expand Down
5 changes: 0 additions & 5 deletions conf/battle/player.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ quest_skill_reset: no
// You must have basic skills to be able to sit, trade, form a party or create a chatroom? (Note 1)
basic_skill_check: yes

// When teleporting, or spawning to a map, how long before a monster sees you if you don't move? (time is in milliseconds)
// That is, when you go to a map and don't move, how long before the monsters will notice you.
// If you attack a monster, it will attack you back regardless of this setting.
player_invincible_time: 5000

// The time interval for HP to restore naturally. (in milliseconds)
natural_healhp_interval: 6000

Expand Down
10 changes: 7 additions & 3 deletions conf/msg_conf/map_msg.conf
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,11 @@
// @reloadcashdb
832: Cash shop database has been reloaded.

//833-899 free
// Map Zones
833: This command is disabled on this map.
834: Map Zone database has been reloaded.

//834-899 free

//------------------------------------
// More atcommands message
Expand Down Expand Up @@ -1127,9 +1131,9 @@
// @mapinfo
1038: Please enter at least one valid list number (usage: @mapinfo <0-3> <map>).
1039: ------ Map Info ------
1040: Map: %s | Players: %d | NPCs: %d | Chats: %d | Vendings: %d
1040: Map: %s (Zone: %s) | Players: %d | NPCs: %d | Chats: %d | Vendings: %d
1041: ------ Map Flags ------
1042: Town Map
1042: Damage Rate Adjustments:
1043: Autotrade Enabled
1044: Autotrade Disabled
1045: Battlegrounds ON (type %d)
Expand Down
4 changes: 2 additions & 2 deletions conf/msg_conf/map_msg_chn.conf
Original file line number Diff line number Diff line change
Expand Up @@ -871,9 +871,9 @@
// @mapinfo
1038: 請至少輸入一個有效的列表數字 (使用方法: @mapinfo <0-3> [地圖名稱])
1039: ------ 地圖資訊 ------
1040: 地圖名: %s | 地圖玩家數量: %d | 地圖NPC數量: %d | 地圖聊天室數量: %d
1040: 地圖名: %s (Zone: %s) | 地圖玩家數量: %d | 地圖NPC數量: %d | 地圖聊天室數量: %d | Vendings: %d
1041: ------ 地圖旗標 ------
1042: 城市地圖
1042: Battle Rate Adjustments:
1043: 可離線掛店
1044: 不可離線掛店
1045: 戰場 (類型 %d)
Expand Down
4 changes: 2 additions & 2 deletions conf/msg_conf/map_msg_frn.conf
Original file line number Diff line number Diff line change
Expand Up @@ -883,9 +883,9 @@
// @mapinfo
1038: Entrez un num�ro de la liste (usage: @mapinfo <0-3> <map>).
1039: ------ Map Info ------
1040: Nom de la Map: %s | Joueurs sur la Map: %d | NPCs sur la Map: %d | Chats sur la Map: %d
1040: Nom de la Map: %s (Zone: %s) | Joueurs sur la Map: %d | NPCs sur la Map: %d | Chats sur la Map: %d | Vendings: %d
1041: ------ Map Flags ------
1042: Town Map
1042: Battle Rate Adjustments:
1043: Autotrade Activ�
1044: Autotrade D�sactiv�
1045: Battlegrounds ON (type %d)
Expand Down
4 changes: 2 additions & 2 deletions conf/msg_conf/map_msg_idn.conf
Original file line number Diff line number Diff line change
Expand Up @@ -970,9 +970,9 @@
// @mapinfo
1038: Harap masukkan setidaknya 1 pilihan. (Penggunaan: @mapinfo <0-3> <map>).
1039: ------ Map Info ------
1040: Map: %s | Pemain: %d | NPC: %d | Ruang Chat: %d | Toko: %d
1040: Map: %s (Zone: %s) | Pemain: %d | NPC: %d | Ruang Chat: %d | Toko: %d
1041: ------ Map Flags ------
1042: Kota
1042: Battle Rate Adjustments:
1043: Autotrade diaktifkan
1044: Autotrade dinonaktifkan
1045: Battleground ON (tipe %d)
Expand Down
4 changes: 2 additions & 2 deletions conf/msg_conf/map_msg_por.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,9 @@
// @mapinfo
1038: Digite pelo menos um n�mero v�lido da lista (uso: @mapinfo <0-3> <mapa>).
1039: ------ Informa��o do Mapa ------
1040: Mapa: %s | Jogadores: %d | NPCs: %d | Chats: %d | Vendas: %d
1040: Mapa: %s (Zona: %s) | Jogadores: %d | NPCs: %d | Chats: %d | Vendas: %d
1041: ------ Map Flags ------
1042: Mapa de Cidade
1042: Ajustes na taxa de dano:
1043: Autotrade Habilitado
1044: Autotrade Desabilitado
1045: Battlegrounds Habilitado (tipo %d)
Expand Down
4 changes: 2 additions & 2 deletions conf/msg_conf/map_msg_rus.conf
Original file line number Diff line number Diff line change
Expand Up @@ -884,9 +884,9 @@
// @mapinfo
1038: ������� ���� �� ���� ����� (�������������: @mapinfo <0-3> <�������>).
1039: ------ ���������� � ������� ------
1040: �������� �������: %s | ������: %d | ���: %d | ����: %d
1040: �������� �������: %s (Zone: %s) | ������: %d | ���: %d | ����: %d | Vendings: %d
1041: ------ �������� ------
1042: �������
1042: Battle Rate Adjustments:
1043: Autotrade ��������
1044: Autotrade ��������
1045: Battlegrounds �������� (��� %d)
Expand Down
4 changes: 2 additions & 2 deletions conf/msg_conf/map_msg_spn.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1124,9 +1124,9 @@
// @mapinfo
1038: Introduce un n�mero de la lista (instrucciones: @mapinfo <0-3> <mapa>).
1039: ------ Informaci�n del mapa ------
1040: Mapa: %s | Jugadores: %d | NPCs: %d | Chats: %d | Tiendas: %d
1040: Mapa: %s (Zona: %s) | Jugadores: %d | NPCs: %d | Chats: %d | Tiendas: %d
1041: ------ Opciones del mapa ------
1042: Mapa de ciudad
1042: Ajuste Tasa de Batalla:
1043: Autotrade activado
1044: Autotrade desactivado
1045: Battleground activado (tipo %d)
Expand Down
4 changes: 2 additions & 2 deletions conf/msg_conf/map_msg_tha.conf
Original file line number Diff line number Diff line change
Expand Up @@ -877,9 +877,9 @@
// @mapinfo
1038: �ô�к��Ţ���ҧ˹���˹�觤�Ҩҡ��¡�� (�Ը���: @mapinfo <0-3> <map>).
1039: ------ ��������´Ἱ��� ------
1040: Ἱ���: %s | ������: %d | NPCs: %d | Chats: %d | Vendings: %d
1040: Ἱ���: %s (Zone: %s) | ������: %d | NPCs: %d | Chats: %d | Vendings: %d
1041: ------ Map Flags ------
1042: Town Map
1042: Battle Rate Adjustments:
1043: Autotrade Enabled
1044: Autotrade Disabled
1045: Battlegrounds ON (type %d)
Expand Down
30 changes: 0 additions & 30 deletions db/import-tmpl/item_noequip.txt

This file was deleted.

28 changes: 0 additions & 28 deletions db/import-tmpl/job_noenter_map.txt

This file was deleted.

39 changes: 39 additions & 0 deletions db/import-tmpl/map_zones.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This file is a part of rAthena.
# Copyright(C) 2024 rAthena Development Team
# https://rathena.org - https://github.com/rathena
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
#
###########################################################################
# Map Zone Database
###########################################################################
#
# Map Zone Settings
#
###########################################################################
# - Id Zone ID.
# DisabledCommands: List of disabled @commands. (Default: null)
# DisabledSkills: List of disabled skills. (Default: null)
# DisabledItems: List of disabled items. (Default: null)
# DisabledStatuses: List of disabled statuses. (Default: null)
# RestrictedJobs: List of restricted jobs from entering zone. (Default: null)
# Maps: List of maps to apply the zone to.
# Mapflags: List of mapflags. (Default: null)
# - Flag Mapflag name.
# Value Value assigned to mapflag. (Default: true)
###########################################################################

Header:
Type: MAP_ZONES
Version: 1
24 changes: 0 additions & 24 deletions db/import-tmpl/skill_nocast_db.txt

This file was deleted.

25 changes: 0 additions & 25 deletions db/import-tmpl/status_disabled.txt

This file was deleted.

47 changes: 47 additions & 0 deletions db/map_zones.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This file is a part of rAthena.
# Copyright(C) 2024 rAthena Development Team
# https://rathena.org - https://github.com/rathena
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
#
###########################################################################
# Map Zone Database
###########################################################################
#
# Map Zone Settings
#
###########################################################################
# - Id Zone ID.
# DisabledCommands: List of disabled @commands. (Default: null)
# DisabledSkills: List of disabled skills. (Default: null)
# DisabledItems: List of disabled items. (Default: null)
# DisabledStatuses: List of disabled statuses. (Default: null)
# RestrictedJobs: List of restricted jobs from entering zone. (Default: null)
# Maps: List of maps to apply the zone to.
# Mapflags: List of mapflags. (Default: null)
# - Flag Mapflag name.
# Value Value assigned to mapflag. (Default: true)
###########################################################################

Header:
Type: MAP_ZONES
Version: 1

Footer:
Imports:
- Path: db/pre-re/map_zones.yml
Mode: Prerenewal
- Path: db/re/map_zones.yml
Mode: Renewal
- Path: db/import/map_zones.yml
Loading