From 67d12616599e30a0ade0bf426105eb6f37222e82 Mon Sep 17 00:00:00 2001 From: idk-whoami <60462533+idk-whoami@users.noreply.github.com> Date: Thu, 24 Feb 2022 07:20:01 +0700 Subject: [PATCH] Added RC2_Malangdo race groups (#6633) --- db/re/mob_db.yml | 42 +++++++++++++++++++++++++ doc/item_bonus.txt | 8 +++-- doc/yaml/sql/mob_db.sql | 1 + doc/yaml/sql/mob_db2.sql | 1 + doc/yaml/sql/mob_db2_re.sql | 1 + doc/yaml/sql/mob_db_re.sql | 1 + sql-files/mob_db.sql | 1 + sql-files/mob_db2.sql | 1 + sql-files/mob_db2_re.sql | 1 + sql-files/mob_db_re.sql | 1 + sql-files/upgrades/upgrade_20220224.sql | 12 +++++++ src/map/map.hpp | 1 + src/map/mob.cpp | 2 +- src/map/script_constants.hpp | 1 + 14 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 sql-files/upgrades/upgrade_20220224.sql diff --git a/db/re/mob_db.yml b/db/re/mob_db.yml index 147b970507..6a2c86bf99 100644 --- a/db/re/mob_db.yml +++ b/db/re/mob_db.yml @@ -3187,6 +3187,8 @@ Body: ChaseRange: 12 Size: Small Race: Plant + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 1000 @@ -31938,6 +31940,8 @@ Body: ChaseRange: 12 Size: Small Race: Formless + RaceGroups: + Malangdo: true Element: Earth ElementLevel: 2 WalkSpeed: 300 @@ -46109,6 +46113,8 @@ Body: ChaseRange: 12 Size: Small Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 1 WalkSpeed: 300 @@ -46156,6 +46162,8 @@ Body: ChaseRange: 12 Size: Small Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 300 @@ -46203,6 +46211,8 @@ Body: ChaseRange: 12 Size: Small Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 1 WalkSpeed: 200 @@ -46248,6 +46258,8 @@ Body: ChaseRange: 12 Size: Small Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 1 WalkSpeed: 200 @@ -46297,6 +46309,8 @@ Body: ChaseRange: 12 Size: Small Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 200 @@ -46347,6 +46361,8 @@ Body: ChaseRange: 12 Size: Small Race: Insect + RaceGroups: + Malangdo: true Element: Water ElementLevel: 1 WalkSpeed: 150 @@ -46394,6 +46410,8 @@ Body: ChaseRange: 12 Size: Large Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 3 WalkSpeed: 150 @@ -46441,6 +46459,8 @@ Body: ChaseRange: 12 Size: Large Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 200 @@ -46488,6 +46508,8 @@ Body: ChaseRange: 12 Size: Medium Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 150 @@ -46535,6 +46557,8 @@ Body: ChaseRange: 12 Size: Medium Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 190 @@ -46584,6 +46608,8 @@ Body: ChaseRange: 12 Size: Medium Race: Demon + RaceGroups: + Malangdo: true Element: Water ElementLevel: 3 WalkSpeed: 200 @@ -46631,6 +46657,8 @@ Body: ChaseRange: 12 Size: Medium Race: Demon + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 165 @@ -46728,6 +46756,8 @@ Body: ChaseRange: 12 Size: Large Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 165 @@ -46777,6 +46807,8 @@ Body: ChaseRange: 12 Size: Large Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 165 @@ -46825,6 +46857,8 @@ Body: ChaseRange: 12 Size: Large Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 165 @@ -46874,6 +46908,8 @@ Body: ChaseRange: 12 Size: Large Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 165 @@ -46948,6 +46984,8 @@ Body: ChaseRange: 12 Size: Small Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 300 @@ -46987,6 +47025,8 @@ Body: ChaseRange: 12 Size: Small Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 300 @@ -47027,6 +47067,8 @@ Body: ChaseRange: 12 Size: Large Race: Fish + RaceGroups: + Malangdo: true Element: Water ElementLevel: 2 WalkSpeed: 300 diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt index 57e2fb744a..ab0556d27e 100644 --- a/doc/item_bonus.txt +++ b/doc/item_bonus.txt @@ -26,9 +26,11 @@ This list contains all available constants referenced in the 'bonus' commands. RC_Insect, RC_Plant, RC_Player_Human (RC_Player deprecated), RC_Player_Doram, RC_Undead, RC_All * Monster Race (mr) - RC2_Goblin, RC2_Kobold, RC2_Orc, RC2_Golem, RC2_Guardian, RC2_Ninja, - RC2_BioLab, RC2_SCARABA, RC2_FACEWORM, RC2_THANATOS, RC2_CLOCKTOWER, RC2_ROCKRIDGE - See 'db/(pre-)re/mob_race2_db.txt' + RC2_Goblin, RC2_Kobold, RC2_Orc, RC2_Golem, RC2_Guardian, RC2_Ninja, RC2_GVG, RC2_Battlefield, + RC2_Treasure, RC2_BioLab, RC2_Manuk, RC2_Splendide, RC2_Scaraba, RC2_OGH_ATK_DEF, RC2_OGH_Hidden, + RC2_Bio5_Swordman_Thief, RC2_Bio5_Acolyte_Merchant, RC2_Bio5_Mage_Archer, RC2_Bio5_MVP, + RC2_Clocktower, RC2_Thanatos, RC2_Faceworm, RC2_Hearthunter, RC2_Rockridge, RC2_Werner_Lab, + RC2_Temple_Demon, RC2_Illusion_Vampire, RC2_Malangdo * Class (c) Class_Normal, Class_Boss, Class_Guardian, Class_All diff --git a/doc/yaml/sql/mob_db.sql b/doc/yaml/sql/mob_db.sql index f4f4cc1f1b..50027cba75 100644 --- a/doc/yaml/sql/mob_db.sql +++ b/doc/yaml/sql/mob_db.sql @@ -56,6 +56,7 @@ CREATE TABLE `mob_db` ( `racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL, `racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL, `racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL, + `racegroup_malangdo` tinyint(1) unsigned DEFAULT NULL, `element` varchar(24) DEFAULT NULL, `element_level` tinyint(4) unsigned DEFAULT NULL, `walk_speed` smallint(6) unsigned DEFAULT NULL, diff --git a/doc/yaml/sql/mob_db2.sql b/doc/yaml/sql/mob_db2.sql index 76d0eca6b5..f0ef9383dd 100644 --- a/doc/yaml/sql/mob_db2.sql +++ b/doc/yaml/sql/mob_db2.sql @@ -56,6 +56,7 @@ CREATE TABLE `mob_db2` ( `racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL, `racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL, `racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL, + `racegroup_malangdo` tinyint(1) unsigned DEFAULT NULL, `element` varchar(24) DEFAULT NULL, `element_level` tinyint(4) unsigned DEFAULT NULL, `walk_speed` smallint(6) unsigned DEFAULT NULL, diff --git a/doc/yaml/sql/mob_db2_re.sql b/doc/yaml/sql/mob_db2_re.sql index d9649f6481..afd46ae64c 100644 --- a/doc/yaml/sql/mob_db2_re.sql +++ b/doc/yaml/sql/mob_db2_re.sql @@ -58,6 +58,7 @@ CREATE TABLE `mob_db2_re` ( `racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL, `racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL, `racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL, + `racegroup_malangdo` tinyint(1) unsigned DEFAULT NULL, `element` varchar(24) DEFAULT NULL, `element_level` tinyint(4) unsigned DEFAULT NULL, `walk_speed` smallint(6) unsigned DEFAULT NULL, diff --git a/doc/yaml/sql/mob_db_re.sql b/doc/yaml/sql/mob_db_re.sql index 1e9a97a137..e35e5746ff 100644 --- a/doc/yaml/sql/mob_db_re.sql +++ b/doc/yaml/sql/mob_db_re.sql @@ -58,6 +58,7 @@ CREATE TABLE `mob_db_re` ( `racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL, `racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL, `racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL, + `racegroup_malangdo` tinyint(1) unsigned DEFAULT NULL, `element` varchar(24) DEFAULT NULL, `element_level` tinyint(4) unsigned DEFAULT NULL, `walk_speed` smallint(6) unsigned DEFAULT NULL, diff --git a/sql-files/mob_db.sql b/sql-files/mob_db.sql index 796740646f..76023076d3 100644 --- a/sql-files/mob_db.sql +++ b/sql-files/mob_db.sql @@ -56,6 +56,7 @@ CREATE TABLE `mob_db` ( `racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL, `racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL, `racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL, + `racegroup_malangdo` tinyint(1) unsigned DEFAULT NULL, `element` varchar(24) DEFAULT NULL, `element_level` tinyint(4) unsigned DEFAULT NULL, `walk_speed` smallint(6) unsigned DEFAULT NULL, diff --git a/sql-files/mob_db2.sql b/sql-files/mob_db2.sql index cfb3ee0645..7155692490 100644 --- a/sql-files/mob_db2.sql +++ b/sql-files/mob_db2.sql @@ -56,6 +56,7 @@ CREATE TABLE `mob_db2` ( `racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL, `racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL, `racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL, + `racegroup_malangdo` tinyint(1) unsigned DEFAULT NULL, `element` varchar(24) DEFAULT NULL, `element_level` tinyint(4) unsigned DEFAULT NULL, `walk_speed` smallint(6) unsigned DEFAULT NULL, diff --git a/sql-files/mob_db2_re.sql b/sql-files/mob_db2_re.sql index 20722c5504..8d25116f6d 100644 --- a/sql-files/mob_db2_re.sql +++ b/sql-files/mob_db2_re.sql @@ -58,6 +58,7 @@ CREATE TABLE `mob_db2_re` ( `racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL, `racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL, `racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL, + `racegroup_malangdo` tinyint(1) unsigned DEFAULT NULL, `element` varchar(24) DEFAULT NULL, `element_level` tinyint(4) unsigned DEFAULT NULL, `walk_speed` smallint(6) unsigned DEFAULT NULL, diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql index 3de39427d8..9c171a9e65 100644 --- a/sql-files/mob_db_re.sql +++ b/sql-files/mob_db_re.sql @@ -58,6 +58,7 @@ CREATE TABLE `mob_db_re` ( `racegroup_werner_lab` tinyint(1) unsigned DEFAULT NULL, `racegroup_temple_demon` tinyint(1) unsigned DEFAULT NULL, `racegroup_illusion_vampire` tinyint(1) unsigned DEFAULT NULL, + `racegroup_malangdo` tinyint(1) unsigned DEFAULT NULL, `element` varchar(24) DEFAULT NULL, `element_level` tinyint(4) unsigned DEFAULT NULL, `walk_speed` smallint(6) unsigned DEFAULT NULL, diff --git a/sql-files/upgrades/upgrade_20220224.sql b/sql-files/upgrades/upgrade_20220224.sql new file mode 100644 index 0000000000..3e4df0ca5e --- /dev/null +++ b/sql-files/upgrades/upgrade_20220224.sql @@ -0,0 +1,12 @@ +ALTER TABLE `mob_db` + ADD COLUMN `racegroup_malangdo` tinyint unsigned DEFAULT NULL +; +ALTER TABLE `mob_db2` + ADD COLUMN `racegroup_malangdo` tinyint unsigned DEFAULT NULL +; +ALTER TABLE `mob_db_re` + ADD COLUMN `racegroup_malangdo` tinyint unsigned DEFAULT NULL +; +ALTER TABLE `mob_db2_re` + ADD COLUMN `racegroup_malangdo` tinyint unsigned DEFAULT NULL +; diff --git a/src/map/map.hpp b/src/map/map.hpp index 4481244bca..c9697a715d 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -345,6 +345,7 @@ enum e_race2 : uint8{ RC2_WERNER_LAB, RC2_TEMPLE_DEMON, RC2_ILLUSION_VAMPIRE, + RC2_MALANGDO, RC2_MAX }; diff --git a/src/map/mob.cpp b/src/map/mob.cpp index d7bd298c3d..8146f6838c 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -5151,7 +5151,7 @@ static int mob_read_sqldb(void) for( uint8 fi = 0; fi < ARRAYLENGTH(mob_db_name); ++fi ) { // retrieve all rows from the mob database if( SQL_ERROR == Sql_Query(mmysql_handle, "SELECT `id`,`name_aegis`,`name_english`,`name_japanese`,`level`,`hp`,`sp`,`base_exp`,`job_exp`,`mvp_exp`,`attack`,`attack2`,`defense`,`magic_defense`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`attack_range`,`skill_range`,`chase_range`,`size`,`race`," - "`racegroup_goblin`,`racegroup_kobold`,`racegroup_orc`,`racegroup_golem`,`racegroup_guardian`,`racegroup_ninja`,`racegroup_gvg`,`racegroup_battlefield`,`racegroup_treasure`,`racegroup_biolab`,`racegroup_manuk`,`racegroup_splendide`,`racegroup_scaraba`,`racegroup_ogh_atk_def`,`racegroup_ogh_hidden`,`racegroup_bio5_swordman_thief`,`racegroup_bio5_acolyte_merchant`,`racegroup_bio5_mage_archer`,`racegroup_bio5_mvp`,`racegroup_clocktower`,`racegroup_thanatos`,`racegroup_faceworm`,`racegroup_hearthunter`,`racegroup_rockridge`,`racegroup_werner_lab`,`racegroup_temple_demon`,`racegroup_illusion_vampire`," + "`racegroup_goblin`,`racegroup_kobold`,`racegroup_orc`,`racegroup_golem`,`racegroup_guardian`,`racegroup_ninja`,`racegroup_gvg`,`racegroup_battlefield`,`racegroup_treasure`,`racegroup_biolab`,`racegroup_manuk`,`racegroup_splendide`,`racegroup_scaraba`,`racegroup_ogh_atk_def`,`racegroup_ogh_hidden`,`racegroup_bio5_swordman_thief`,`racegroup_bio5_acolyte_merchant`,`racegroup_bio5_mage_archer`,`racegroup_bio5_mvp`,`racegroup_clocktower`,`racegroup_thanatos`,`racegroup_faceworm`,`racegroup_hearthunter`,`racegroup_rockridge`,`racegroup_werner_lab`,`racegroup_temple_demon`,`racegroup_illusion_vampire`,`racegroup_malangdo`," "`element`,`element_level`,`walk_speed`,`attack_delay`,`attack_motion`,`damage_motion`,`damage_taken`,`ai`,`class`," "`mode_canmove`,`mode_looter`,`mode_aggressive`,`mode_assist`,`mode_castsensoridle`,`mode_norandomwalk`,`mode_nocast`,`mode_canattack`,`mode_castsensorchase`,`mode_changechase`,`mode_angry`,`mode_changetargetmelee`,`mode_changetargetchase`,`mode_targetweak`,`mode_randomtarget`,`mode_ignoremelee`,`mode_ignoremagic`,`mode_ignoreranged`,`mode_mvp`,`mode_ignoremisc`,`mode_knockbackimmune`,`mode_teleportblock`,`mode_fixeditemdrop`,`mode_detector`,`mode_statusimmune`,`mode_skillimmune`," "`mvpdrop1_item`,`mvpdrop1_rate`,`mvpdrop1_option`,`mvpdrop1_index`,`mvpdrop2_item`,`mvpdrop2_rate`,`mvpdrop2_option`,`mvpdrop2_index`,`mvpdrop3_item`,`mvpdrop3_rate`,`mvpdrop3_option`,`mvpdrop3_index`," diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index deed5d7d1f..defdb7bd5d 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -4048,6 +4048,7 @@ export_constant(RC2_WERNER_LAB); export_constant(RC2_TEMPLE_DEMON); export_constant(RC2_ILLUSION_VAMPIRE); + export_constant(RC2_MALANGDO); export_constant(RC2_MAX); /* monster ai */