diff options
-rw-r--r-- | conf/battle/client.conf | 2 | ||||
-rw-r--r-- | db/abra_db.txt | 7 | ||||
-rw-r--r-- | db/cashshop_db.conf | 8 | ||||
-rw-r--r-- | db/const.txt | 1 | ||||
-rw-r--r-- | db/elemental_skill_db.txt | 38 | ||||
-rw-r--r-- | db/pre-re/map_zone_db.conf | 21 | ||||
-rw-r--r-- | db/pre-re/skill_tree.conf | 2 | ||||
-rw-r--r-- | db/re/map_zone_db.conf | 21 | ||||
-rw-r--r-- | db/re/skill_tree.conf | 2 | ||||
-rw-r--r-- | db/skill_changematerial_db.txt | 156 | ||||
-rw-r--r-- | db/spellbook_db.txt | 53 | ||||
-rw-r--r-- | npc/re/mobs/dungeons/moc_pryd.txt | 17 | ||||
-rw-r--r-- | src/map/battle.c | 4 | ||||
-rw-r--r-- | src/map/clif.c | 24 | ||||
-rw-r--r-- | src/map/mail.c | 2 | ||||
-rw-r--r-- | src/map/npc.c | 151 | ||||
-rw-r--r-- | src/map/pc.c | 3 | ||||
-rw-r--r-- | src/map/pc.h | 3 | ||||
-rw-r--r-- | src/map/skill.c | 4 | ||||
-rw-r--r-- | src/map/status.c | 4 | ||||
-rw-r--r-- | src/map/status.h | 3 |
21 files changed, 312 insertions, 214 deletions
diff --git a/conf/battle/client.conf b/conf/battle/client.conf index c832163be..eae8aad3b 100644 --- a/conf/battle/client.conf +++ b/conf/battle/client.conf @@ -117,4 +117,4 @@ client_sort_storage: no // Note: Do not enable this, if you enabled commands for players, // because the client sees multiple commands in succession as spam. // Default: 0 (means disabled) -client_accept_chatdori: 1 +client_accept_chatdori: 0 diff --git a/db/abra_db.txt b/db/abra_db.txt index 41c1b6eae..2eb770abd 100644 --- a/db/abra_db.txt +++ b/db/abra_db.txt @@ -1,16 +1,17 @@ // Hocus-Pocus (Abrakadabra) Castable Skills Database // // Structure of Database: -// SkillID,DummyName,RequiredHocusPocusLevel,Rate +// SkillID,DummyName,RequiredHocusPocusLevel,Rate // // 01. SkillID Skill ID to be casted by hocus pocus. // 02. DummyName Name of the skill (informative, not used by server). // 03. RequiredHocusPocusLevel Minimum skill level of hocus pocus for the current skill to be selected. -// 04. Rate Chance at which the skill is selected (1 = 0.01%, 10000 = 100%). +// 04. Rate Chance at which a skill is selected (1 = 0.01%, 10000 = 100%). // // NOTE: The skill is picked at random from the entire database and then tested for rate. If it -// does not succeed at that rate, an another skill is picked and tested. This continues +// does not succeed at that rate, another skill is picked and tested. This continues // until a skill succeeds. +//==================================================== //1,Basic Skill,1,0 diff --git a/db/cashshop_db.conf b/db/cashshop_db.conf index 381d898e0..05bf5b270 100644 --- a/db/cashshop_db.conf +++ b/db/cashshop_db.conf @@ -7,8 +7,14 @@ //= \_| |_/\___|_| \___|\__,_|_|\___||___/ //= //= http://hercules.ws/board/ -//==================================================== +//================= More Information ================= //= http://hercules.ws/board/topic/367-introducing-cash-shop-support/ +//==================================================== +// This file handles the entire Cashshop. You can simply +// add in any amount of items you like within each category. +// Please keep in mind that the Cashshop does not work +// with ragexere clients. +//==================================================== cash_shop: ( { diff --git a/db/const.txt b/db/const.txt index d479e79cd..3b1aa6490 100644 --- a/db/const.txt +++ b/db/const.txt @@ -627,6 +627,7 @@ Eff_Confusion 7 Eff_Blind 8 Eff_Bleeding 9 Eff_DPoison 10 +Eff_Burning 11 Ele_Neutral 0 Ele_Water 1 diff --git a/db/elemental_skill_db.txt b/db/elemental_skill_db.txt index a0852e5f3..aa0a428ef 100644 --- a/db/elemental_skill_db.txt +++ b/db/elemental_skill_db.txt @@ -1,55 +1,91 @@ // Elemental Summons Skill Database // // Structure of Database: -// ElementalID,SkillID,SkillLevel,ReqMode +// ElementalID,SkillID,SkillLevel,ReqMode // // Spirit Modes: 1 = Passive, 2 = Defensive, 4 = Aggressive +//==================================================== +//================ // EL_AGNI_S +//================ 2114,8413,1,1 //EL_PYROTECHNIC,Pyrotechnic 2114,8401,1,2 //EL_CIRCLE_OF_FIRE,Circle of Fire 2114,8425,1,4 //EL_FIRE_ARROW,Fire Arrow + +//================ // EL_AGNI_M +//================ 2115,8414,1,1 //EL_HEATER,Heater 2115,8402,1,2 //EL_FIRE_CLOAK,Fire Cloak 2115,8426,1,4 //EL_FIRE_BOMB,Fire Bomb + +//================ // EL_AGNI_L +//================ 2116,8415,1,1 //EL_TROPIC,Tropic 2116,8403,1,2 //EL_FIRE_MANTLE,Fire Mantle 2116,8428,1,4 //EL_FIRE_WAVE,Fire Wave + +//================ // EL_AQUA_S +//================ 2117,8416,1,1 //EL_AQUAPLAY,Aqua Play 2117,8404,1,2 //EL_WATER_SCREEN,Water Screen 2117,8430,1,4 //EL_ICE_NEEDLE,Ice Needle + +//================ // EL_AQUA_M +//================ 2118,8417,1,1 //EL_COOLER,Cooler 2118,8405,1,2 //EL_WATER_DROP,Water Drop 2118,8431,1,4 //EL_WATER_SCREW,Water Screw + +//================ // EL_AQUA_L +//================ 2119,8418,1,1 //EL_CHILLY_AIR,Cool Air 2119,8406,1,2 //EL_WATER_BARRIER,Water Barrier 2119,8433,1,4 //EL_TIDAL_WEAPON,Tidal Weapon + +//================ // EL_VENTUS_S +//================ 2120,8419,1,1 //EL_GUST,Gust 2120,8407,1,2 //EL_WIND_STEP,Wind Step 2120,8434,1,4 //EL_WIND_SLASH,Wind Slasher + +//================ // EL_VENTUS_M +//================ 2121,8420,1,1 //EL_BLAST,Blast 2121,8408,1,2 //EL_WIND_CURTAIN,Wind Curtain 2121,8435,1,4 //EL_HURRICANE,Hurricane Rage + +//================ // EL_VENTUS_L +//================ 2122,8421,1,1 //EL_WILD_STORM,Wild Storm 2122,8409,1,2 //EL_ZEPHYR,Zephyr 2122,8437,1,4 //EL_TYPOON_MIS,Typhoon Missile + +//================ // EL_TERA_S +//================ 2123,8422,1,1 //EL_PETROLOGY,Petrology 2123,8410,1,2 //EL_SOLID_SKIN,Solid Skin 2123,8439,1,4 //EL_STONE_HAMMER,Stone Hammer + +//================ // EL_TERA_M +//================ 2124,8423,1,1 //EL_CURSED_SOIL,Cursed Soil 2124,8411,1,2 //EL_STONE_SHIELD,Stone Shield 2124,8440,1,4 //EL_ROCK_CRUSHER,Rock Launcher + +//================ // EL_TERA_L +//================ 2125,8424,1,1 //EL_UPHEAVAL,Upheaval 2125,8412,1,2 //EL_POWER_OF_GAIA,Power of Gaia 2125,8442,1,4 //EL_STONE_RAIN,Stone Rain diff --git a/db/pre-re/map_zone_db.conf b/db/pre-re/map_zone_db.conf index 96dbd0c7a..f51fd8fc6 100644 --- a/db/pre-re/map_zone_db.conf +++ b/db/pre-re/map_zone_db.conf @@ -9,17 +9,22 @@ //= http://hercules.ws/board/ //==================================================== //= Hercules Map Zone Database [Ind/Hercules] -//== +//================ More Information ================== +//= http://hercules.ws/board/topic/302-introducing-hercules-map-zone-database/ +//= (TODO: replace with wiki link and detail the wiki page in a decent format ^) +//==================================================== +//================ Description ======================= //= A unlimited number of zones may be created, a zone //= may be used to create a set of disabled items, disabled skills -//= and mapflags to be used by as many maps as one chooses, -//= maps can be linked to a specific zone through the zone mapflag -//= '<map name><tab>mapflag<tab>zone<tab><zone name>' -//== available types for 'disabled_skills': +//= and mapflags to be used by as many maps as one chooses. +//= Maps can be linked to a specific zone through the zone mapflag +//= '<map name><tab>mapflag<tab>zone<tab><zone name>'. +//==================================================== +//= Available types for 'disabled_skills': //= PLAYER, HOMUN, MERCENARY, MONSTER, PET, ELEMENTAL, MOB_BOSS, CLONE, ALL and NONE -//== More on -//= http://hercules.ws/board/topic/302-introducing-hercules-map-zone-database/ -//= (TODO: replace with wiki link and detail the wiki page in a decent format ^) +//==================================================== + + zones: ( { /* All zone is a dynamic (very special) zone that is forcebly inherited by ALL maps automatically */ diff --git a/db/pre-re/skill_tree.conf b/db/pre-re/skill_tree.conf index a6eb10626..45aea7a20 100644 --- a/db/pre-re/skill_tree.conf +++ b/db/pre-re/skill_tree.conf @@ -8,7 +8,7 @@ //= //= http://hercules.ws/board/ //================= More Information ================= -// http://hercules.ws/board/topic/1188-skill-tree-db-redesign/ <desc~!> +// http://hercules.ws/board/topic/1188-skill-tree-db-redesign/ //================ Structure Example ================= /* Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there) diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf index 96dbd0c7a..f51fd8fc6 100644 --- a/db/re/map_zone_db.conf +++ b/db/re/map_zone_db.conf @@ -9,17 +9,22 @@ //= http://hercules.ws/board/ //==================================================== //= Hercules Map Zone Database [Ind/Hercules] -//== +//================ More Information ================== +//= http://hercules.ws/board/topic/302-introducing-hercules-map-zone-database/ +//= (TODO: replace with wiki link and detail the wiki page in a decent format ^) +//==================================================== +//================ Description ======================= //= A unlimited number of zones may be created, a zone //= may be used to create a set of disabled items, disabled skills -//= and mapflags to be used by as many maps as one chooses, -//= maps can be linked to a specific zone through the zone mapflag -//= '<map name><tab>mapflag<tab>zone<tab><zone name>' -//== available types for 'disabled_skills': +//= and mapflags to be used by as many maps as one chooses. +//= Maps can be linked to a specific zone through the zone mapflag +//= '<map name><tab>mapflag<tab>zone<tab><zone name>'. +//==================================================== +//= Available types for 'disabled_skills': //= PLAYER, HOMUN, MERCENARY, MONSTER, PET, ELEMENTAL, MOB_BOSS, CLONE, ALL and NONE -//== More on -//= http://hercules.ws/board/topic/302-introducing-hercules-map-zone-database/ -//= (TODO: replace with wiki link and detail the wiki page in a decent format ^) +//==================================================== + + zones: ( { /* All zone is a dynamic (very special) zone that is forcebly inherited by ALL maps automatically */ diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf index 3cd90f201..28908c0e7 100644 --- a/db/re/skill_tree.conf +++ b/db/re/skill_tree.conf @@ -8,7 +8,7 @@ //= //= http://hercules.ws/board/ //================= More Information ================= -// http://hercules.ws/board/topic/1188-skill-tree-db-redesign/ <desc~!> +// http://hercules.ws/board/topic/1188-skill-tree-db-redesign/ //================ Structure Example ================= /* Job_Name: { //Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there) diff --git a/db/skill_changematerial_db.txt b/db/skill_changematerial_db.txt index 35b123f66..72b2b1e17 100644 --- a/db/skill_changematerial_db.txt +++ b/db/skill_changematerial_db.txt @@ -1,85 +1,87 @@ // Change Material Database // // Structure of Database: -// ProductID,BaseRate,MakeAmount1,MakeAmountRate1...,MakeAmount5,MakeAmountRate5 -// +// ProductID,BaseRate,MakeAmount1,MakeAmountRate1,MakeAmount2,MakeAmountRate2 +// MakeAmount3,MakeAmountRate3,MakeAmount4,MakeAmountRate4,MakeAmount5,MakeAmountRate5 +//==================================================== // NOTE: // Up to 5 ID/Amount pairs can be specified. // Rate = n/10% +//==================================================== -703,4,800,2,200 // Hinalle -958,800,9,1000 // Horrendous_Mouth -959,800,7,1000 // Rotten_Scale -960,1000,6,800,9,200 // Nipper -961,800,3,1000 // Conch -962,1000,4,800,6,200 // Tentacle -963,800,3,1000 // Sharp_Scale -964,800,8,1000 // Crap_Shell -967,800,4,1000 // Turtle_Shell -968,800,5,1000 // Voucher_Of_Orcish_Hero -970,800,9,1000 // Alchol -971,800,5,1000 // Detrimindexta -973,800,4,1000 // Counteragent -974,1000,4,800,6,200 // Mixture -991,1000,1,500,1,500 // Crystal_Blue -992,1000,1,500,1,500 // Wind_Of_Verdure -999,1000,10,1000 // Steel -1003,500,1,1000 // Coal -1008,800,6,1000 // Frozen_Heart -1009,800,4,1000 // Sacred_Marks -1010,800,8,1000 // Phracon -1011,800,4,1000 // Emveretarcon -1012,800,3,1000 // Lizard_Scruff -1013,9,800,13,200 // Colorful_Shell -1014,4,800,6,200 // Jaws_Of_Ant -1016,1000,7,800,10,200 // Rat_Tail -1019,800,2,1000 // Wooden_Block -1020,1000,4,800,6,200 // Long_Hair -1021,800,4,1000 // Dokkaebi_Horn -1022,1000,2,800,3,200 // Fox_Tail -1024,800,4,1000 // Chinese_Ink -1025,800,8,1000 // Spiderweb -1026,800,4,1000 // Acorn -1030,800,2,1000 // Tiger_Footskin -1033,1000,4,800,6,200 // Root_Of_Maneater -1034,1000,6,800,9,200 // Cobold_Hair -1035,1000,8,800,12,200 // Dragon_Canine -1037,800,6,1000 // Dragon_Train -1038,1000,1,1000 // Petite_Dablofs_Horn -1040,1000,8,800,12,200 // Elder_Pixie's_Beard -1041,800,3,1000 // Lantern -1042,800,6,1000 // Short_Leg -1043,800,6,1000 // Nail_Of_Orc -1045,800,8,1000 // Sacred_Masque -1046,800,4,1000 // Tweezer -1049,800,6,1000 // Skirt_Of_Virgin -1050,800,3,1000 // Tendon -1051,800,7,1000 // Detonator -1053,1000,6,800,9,200 // Tooth_Of_Ancient_Fish -1056,800,8,1000 // Grit -1058,800,5,1000 // Wing_Of_Moth -1059,1000,5,1000 // Transparent_Cloth -1061,80,2,1000 // Starsand_Of_Witch -1061,1000,1,1000 // Starsand_Of_Witch -1064,800,8,1000 // Reins -1615,200,1,1000 // Bone_Wand -2267,1000,1,1000 // Cigar -2267,1000,1,1000 // Cigar -7063,1000,1,200,1,200,1,100 // Soft_Feather -7166,1000,2,1000 // Soft_Silk_Cloth -13269,1000,5,500,2,250,1,100 // Boost500_To_Throw -13270,1000,5,500,2,250,1,100 // Full_SwingK_To_Throw -13271,1000,5,500,2,250,1,100 // Mana_Plus_To_Throw -13272,1000,5,500,2,250,1,100 // Cure_Free_To_Throw -13273,1000,5,500,2,250,1,100 // Stamina_Up_M_To_Throw -13274,1000,5,500,2,250,1,100 // Digestive_F_To_Throw -13275,1000,10,1000 // HP_Inc_PotS_To_Throw -13276,1000,10,1000 // HP_Inc_PotM_To_Throw -13277,1000,10,1000 // HP_Inc_PotL_To_Throw -13278,1000,10,1000 // SP_Inc_PotS_To_Throw -13279,1000,10,1000 // SP_Inc_PotM_To_Throw -13280,1000,10,1000 // SP_Inc_PotL_To_Throw -13281,1000,10,1000 // En_White_PotZ_To_Throw -13282,1000,10,1000 // Vitata500_To_Throw -13283,1000,10,1000 // En_Cel_Juice_To_Throw +703,4,800,2,200 // Hinalle +958,800,9,1000 // Horrendous_Mouth +959,800,7,1000 // Rotten_Scale +960,1000,6,800,9,200 // Nipper +961,800,3,1000 // Conch +962,1000,4,800,6,200 // Tentacle +963,800,3,1000 // Sharp_Scale +964,800,8,1000 // Crap_Shell +967,800,4,1000 // Turtle_Shell +968,800,5,1000 // Voucher_Of_Orcish_Hero +970,800,9,1000 // Alchol +971,800,5,1000 // Detrimindexta +973,800,4,1000 // Counteragent +974,1000,4,800,6,200 // Mixture +991,1000,1,500,1,500 // Crystal_Blue +992,1000,1,500,1,500 // Wind_Of_Verdure +999,1000,10,1000 // Steel +1003,500,1,1000 // Coal +1008,800,6,1000 // Frozen_Heart +1009,800,4,1000 // Sacred_Marks +1010,800,8,1000 // Phracon +1011,800,4,1000 // Emveretarcon +1012,800,3,1000 // Lizard_Scruff +1013,9,800,13,200 // Colorful_Shell +1014,4,800,6,200 // Jaws_Of_Ant +1016,1000,7,800,10,200 // Rat_Tail +1019,800,2,1000 // Wooden_Block +1020,1000,4,800,6,200 // Long_Hair +1021,800,4,1000 // Dokkaebi_Horn +1022,1000,2,800,3,200 // Fox_Tail +1024,800,4,1000 // Chinese_Ink +1025,800,8,1000 // Spiderweb +1026,800,4,1000 // Acorn +1030,800,2,1000 // Tiger_Footskin +1033,1000,4,800,6,200 // Root_Of_Maneater +1034,1000,6,800,9,200 // Cobold_Hair +1035,1000,8,800,12,200 // Dragon_Canine +1037,800,6,1000 // Dragon_Train +1038,1000,1,1000 // Petite_Dablofs_Horn +1040,1000,8,800,12,200 // Elder_Pixie's_Beard +1041,800,3,1000 // Lantern +1042,800,6,1000 // Short_Leg +1043,800,6,1000 // Nail_Of_Orc +1045,800,8,1000 // Sacred_Masque +1046,800,4,1000 // Tweezer +1049,800,6,1000 // Skirt_Of_Virgin +1050,800,3,1000 // Tendon +1051,800,7,1000 // Detonator +1053,1000,6,800,9,200 // Tooth_Of_Ancient_Fish +1056,800,8,1000 // Grit +1058,800,5,1000 // Wing_Of_Moth +1059,1000,5,1000 // Transparent_Cloth +1061,80,2,1000 // Starsand_Of_Witch +1061,1000,1,1000 // Starsand_Of_Witch +1064,800,8,1000 // Reins +1615,200,1,1000 // Bone_Wand +2267,1000,1,1000 // Cigar +2267,1000,1,1000 // Cigar +7063,1000,1,200,1,200,1,100 // Soft_Feather +7166,1000,2,1000 // Soft_Silk_Cloth +13269,1000,5,500,2,250,1,100 // Boost500_To_Throw +13270,1000,5,500,2,250,1,100 // Full_SwingK_To_Throw +13271,1000,5,500,2,250,1,100 // Mana_Plus_To_Throw +13272,1000,5,500,2,250,1,100 // Cure_Free_To_Throw +13273,1000,5,500,2,250,1,100 // Stamina_Up_M_To_Throw +13274,1000,5,500,2,250,1,100 // Digestive_F_To_Throw +13275,1000,10,1000 // HP_Inc_PotS_To_Throw +13276,1000,10,1000 // HP_Inc_PotM_To_Throw +13277,1000,10,1000 // HP_Inc_PotL_To_Throw +13278,1000,10,1000 // SP_Inc_PotS_To_Throw +13279,1000,10,1000 // SP_Inc_PotM_To_Throw +13280,1000,10,1000 // SP_Inc_PotL_To_Throw +13281,1000,10,1000 // En_White_PotZ_To_Throw +13282,1000,10,1000 // Vitata500_To_Throw +13283,1000,10,1000 // En_Cel_Juice_To_Throw diff --git a/db/spellbook_db.txt b/db/spellbook_db.txt index 11c447365..c7be7b8db 100644 --- a/db/spellbook_db.txt +++ b/db/spellbook_db.txt @@ -1,29 +1,36 @@ // Reading Spellbook Preserve Points Database // // Structure of Database: -// SkillID,PreservePoints,Required Book -// -// To add more entries, increase MAX_SKILL_SPELLBOOK_DB in skill.h. +// SkillID,PreservePoints,Required Book +//==================================================== +// To add more entries, increase MAX_SKILL_SPELLBOOK_DB in /src/map/skill.h. +//==================================================== -//Mage -14,7,6190 //Cold Bolt -19,7,6189 //Fire Bolt -20,7,6191 //Lightning Bolt -21,9,6197 //Thunder Storm +//================ +// Mage +//================ +14,7,6190 // Cold Bolt +19,7,6189 // Fire Bolt +20,7,6191 // Lightning Bolt +21,9,6197 // Thunder Storm -//Wizard -83,10,6194 //Meteor Storm -84,9,6198 //Jupitel Thunder -85,10,6193 //Lord of Vermillion -86,9,6199 //Water Ball -89,10,6192 //Storm Gust -90,8,6201 //Earth Spike -91,9,6200 //Heaven's Drive +//================ +// Wizard +//================ +83,10,6194 // Meteor Storm +84,9,6198 // Jupitel Thunder +85,10,6193 // Lord of Vermillion +86,9,6199 // Water Ball +89,10,6192 // Storm Gust +90,8,6201 // Earth Spike +91,9,6200 // Heaven's Drive -//Warlock -2210,8,6205 //Drain Life -2211,12,6204 //Crimson Rock -2213,22,6195 //Comet -2214,12,6203 //Chain Lightning -2216,12,6202 //Earth Strain -2217,22,6196 //Tetra Vortex +//================ +// Warlock +//================ +2210,8,6205 // Drain Life +2211,12,6204 // Crimson Rock +2213,22,6195 // Comet +2214,12,6203 // Chain Lightning +2216,12,6202 // Earth Strain +2217,22,6196 // Tetra Vortex diff --git a/npc/re/mobs/dungeons/moc_pryd.txt b/npc/re/mobs/dungeons/moc_pryd.txt index dcd5197f1..6fc0dbb8a 100644 --- a/npc/re/mobs/dungeons/moc_pryd.txt +++ b/npc/re/mobs/dungeons/moc_pryd.txt @@ -10,6 +10,7 @@ //= 1.1 Official kRO 10.1 spawns [Playtester] //= 1.2 More accurate spawns [Playtester] //= 1.3 Corrected MVP spawn variance. [L0ne_W0lf] +//= 1.4 Added Nightmare spawns. [Euphy] //============================================================ //================================================== @@ -62,3 +63,19 @@ moc_pryd06,0,0,0,0 monster Verit 1032,30,5000,0,0 moc_pryd06,0,0,0,0 monster Arclouze 1194,20,5000,0,0 moc_pryd06,0,0,0,0 monster Ancient Mummy 1297,20,5000,0,0 moc_pryd06,102,85,1,1 boss_monster Amon Ra 1511,1,3600000,600000,0 + +//================================================== +// moc_prydn1 - Nightmare Mode +//================================================== +moc_prydn1,0,0,0,0 monster Nightmare Minorous 2353,60,5000,0,0 +moc_prydn1,0,0,0,0 monster Nightmare Mummy 2354,10,5000,0,0 +moc_prydn1,0,0,0,0 monster Nightmare Verit 2355,50,5000,0,0 + +//================================================== +// moc_prydn2 - Nightmare Mode +//================================================== +moc_prydn2,0,0,0,0 monster Nightmare Mimic 2356,30,5000,0,0 +moc_prydn2,0,0,0,0 monster Nightmare Verit 2355,30,5000,0,0 +moc_prydn2,0,0,0,0 monster Nightmare Arclouze 2358,20,5000,0,0 +moc_prydn2,0,0,0,0 monster Nightmare Ancient Mummy 2360,20,5000,0,0 +moc_prydn2,102,85,1,1 boss_monster Nightmare Amon Ra 2362,1,3600000,600000,1 diff --git a/src/map/battle.c b/src/map/battle.c index 135247734..2016efa3b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -444,8 +444,8 @@ int battle_calc_weapon_damage(struct block_list *src, struct block_list *bl, uin if( flag&2 && sd->bonus.arrow_atk ) damage += sd->bonus.arrow_atk; - if( sd->bonus.eatk > 0 ) - eatk = sd->bonus.eatk; + if( sd->battle_status.equip_atk != 0 ) + eatk = sd->base_status.equip_atk; } if( sc && sc->count ){ diff --git a/src/map/clif.c b/src/map/clif.c index 0000633bc..1b96d45fb 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11862,9 +11862,9 @@ void clif_parse_ResetChar(int fd, struct map_session_data *sd) { char cmd[15]; if( RFIFOW(fd,2) ) - sprintf(cmd,"%cresetskill",atcommand->at_symbol); + sprintf(cmd,"%cskreset",atcommand->at_symbol); else - sprintf(cmd,"%cresetstat",atcommand->at_symbol); + sprintf(cmd,"%cstreset",atcommand->at_symbol); atcommand->parse(fd, sd, cmd, 1); } @@ -13379,23 +13379,25 @@ void clif_parse_GMRecall2(int fd, struct map_session_data* sd) void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd) { char *monster_item_name; + struct mob_db *mob_data; + struct item_data *item_data; char command[NAME_LENGTH+10]; monster_item_name = (char*)RFIFOP(fd,2); monster_item_name[NAME_LENGTH-1] = '\0'; - // FIXME: Should look for item first, then for monster. - // FIXME: /monster takes mob_db Sprite_Name as argument - if( mobdb_searchname(monster_item_name) ) { - snprintf(command, sizeof(command)-1, "%cmonster %s", atcommand->at_symbol, monster_item_name); + if( (item_data=itemdb->search_name(monster_item_name)) != NULL + && strcmp(item_data->name, monster_item_name) != 0 ) { // It only accepts aegis name + if( item_data->type == IT_WEAPON || item_data->type == IT_ARMOR ) // nonstackable + snprintf(command, sizeof(command)-1, "%citem2 %d 1 0 0 0 0 0 0 0", atcommand->at_symbol, item_data->nameid); + else + snprintf(command, sizeof(command)-1, "%citem %d 20", atcommand->at_symbol, item_data->nameid); atcommand->parse(fd, sd, command, 1); return; } - // FIXME: Stackables have a quantity of 20. - // FIXME: Equips are supposed to be unidentified. - - if( itemdb->search_name(monster_item_name) ) { - snprintf(command, sizeof(command)-1, "%citem %s", atcommand->at_symbol, monster_item_name); + if( (mob_data=mob_db(mobdb_searchname(monster_item_name))) + && strcmp(mob_data->sprite, monster_item_name) != 0 ) { // It only accepts sprite name + snprintf(command, sizeof(command)-1, "%cmonster %s", atcommand->at_symbol, mob_data->name); atcommand->parse(fd, sd, command, 1); return; } diff --git a/src/map/mail.c b/src/map/mail.c index 021a51cde..93304bac0 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -200,4 +200,4 @@ void mail_defaults(void) mail->openmail = mail_openmail; mail->deliveryfail = mail_deliveryfail; mail->invalid_operation = mail_invalid_operation; -}
\ No newline at end of file +} diff --git a/src/map/npc.c b/src/map/npc.c index 97f84d73d..673c4f7bd 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -74,6 +74,7 @@ int npc_get_new_npc_id(void) { } static DBMap* ev_db; // const char* event_name -> struct event_data* +static DBMap* ev_label_db; // const char* label_name (without leading "::") -> struct linkdb_node* (key: struct npc_data*; data: struct event_data*) static DBMap* npcname_db; // const char* npc_name -> struct npc_data* struct event_data { @@ -323,6 +324,7 @@ static int npc_event_export(struct npc_data *nd, int i) int pos = nd->u.scr.label_list[i].pos; if ((lname[0] == 'O' || lname[0] == 'o') && (lname[1] == 'N' || lname[1] == 'n')) { struct event_data *ev; + struct linkdb_node *label_linkdb = NULL; char buf[EVENT_NAME_LENGTH]; snprintf(buf, ARRAYLENGTH(buf), "%s::%s", nd->exname, lname); // generate the data and insert it @@ -331,6 +333,9 @@ static int npc_event_export(struct npc_data *nd, int i) ev->pos = pos; if (strdb_put(ev_db, buf, ev)) // There was already another event of the same name? return 1; + label_linkdb = strdb_get(ev_label_db, lname); + linkdb_insert(&label_linkdb, nd, ev); // it changes head to the new node so... + strdb_put(ev_label_db, lname, label_linkdb); // ...we need to update db to point to new head } return 0; } @@ -340,66 +345,58 @@ int npc_event_sub(struct map_session_data* sd, struct event_data* ev, const char /** * Exec name (NPC events) on player or global * Do on all NPC when called with foreach - * @see DBApply */ -int npc_event_doall_sub(DBKey key, DBData *data, va_list ap) +void npc_event_doall_sub(void *key, void *data, va_list ap) { - const char* p = key.str; - struct event_data* ev; + struct event_data* ev = data; int* c; const char* name; int rid; - nullpo_ret(ev = DB->data2ptr(data)); - nullpo_ret(c = va_arg(ap, int *)); - nullpo_ret(name = va_arg(ap, const char *)); + nullpo_retv(c = va_arg(ap, int*)); + nullpo_retv(name = va_arg(ap, const char*)); rid = va_arg(ap, int); - p = strchr(p, ':'); // match only the event name - if( p && strcmpi(name, p) == 0 /* && !ev->nd->src_id */ ) // Do not run on duplicates. [Paradox924X] + if (ev /* && !ev->nd->src_id */) // Do not run on duplicates. [Paradox924X] { - if(rid) // a player may only have 1 script running at the same time - npc_event_sub(iMap->id2sd(rid),ev,key.str); - else - run_script(ev->nd->u.scr.script,ev->pos,rid,ev->nd->bl.id); + if(rid) { // a player may only have 1 script running at the same time + char buf[EVENT_NAME_LENGTH]; + snprintf(buf, ARRAYLENGTH(buf), "%s::%s", ev->nd->exname, name); + npc_event_sub(iMap->id2sd(rid), ev, buf); + } + else { + run_script(ev->nd->u.scr.script, ev->pos, rid, ev->nd->bl.id); + } (*c)++; } - - return 0; } -/** - * @see DBApply - */ -static int npc_event_do_sub(DBKey key, DBData *data, va_list ap) +// runs the specified event (supports both single-npc and global events) +int npc_event_do(const char* name) { - const char* p = key.str; - struct event_data* ev; - int* c; - const char* name; - - nullpo_ret(ev = DB->data2ptr(data)); - nullpo_ret(c = va_arg(ap, int *)); - nullpo_ret(name = va_arg(ap, const char *)); - - if( p && strcmpi(name, p) == 0 ) { - run_script(ev->nd->u.scr.script,ev->pos,0,ev->nd->bl.id); - (*c)++; + if( name[0] == ':' && name[1] == ':' ) { + return npc_event_doall(name+2); // skip leading "::" + } + else { + struct event_data *ev = strdb_get(ev_db, name); + if (ev) { + run_script(ev->nd->u.scr.script, ev->pos, 0, ev->nd->bl.id); + return 1; + } } - return 0; } -// runs the specified event (supports both single-npc and global events) -int npc_event_do(const char* name) +// runs the specified event, with a RID attached (global only) +int npc_event_doall_id(const char* name, int rid) { int c = 0; + struct linkdb_node *label_linkdb = strdb_get(ev_label_db, name); - if( name[0] == ':' && name[1] == ':' ) - ev_db->foreach(ev_db,npc_event_doall_sub,&c,name,0); - else - ev_db->foreach(ev_db,npc_event_do_sub,&c,name); + if (label_linkdb == NULL) + return 0; + linkdb_foreach(&label_linkdb, npc_event_doall_sub, &c, name, rid); return c; } @@ -409,16 +406,6 @@ int npc_event_doall(const char* name) return npc_event_doall_id(name, 0); } -// runs the specified event, with a RID attached (global only) -int npc_event_doall_id(const char* name, int rid) -{ - int c = 0; - char buf[64]; - safesnprintf(buf, sizeof(buf), "::%s", name); - ev_db->foreach(ev_db,npc_event_doall_sub,&c,buf,rid); - return c; -} - /*========================================== * Clock event execution * OnMinute/OnClock/OnHour/OnDay/OnDDHHMM @@ -799,7 +786,7 @@ int npc_event_sub(struct map_session_data* sd, struct event_data* ev, const char ARR_FIND( 0, MAX_EVENTQUEUE, i, sd->eventqueue[i][0] == '\0' ); if( i < MAX_EVENTQUEUE ) { - safestrncpy(sd->eventqueue[i],eventname,50); //Event enqueued. + safestrncpy(sd->eventqueue[i],eventname,EVENT_NAME_LENGTH); //Event enqueued. return 0; } @@ -1778,6 +1765,19 @@ static int npc_unload_ev(DBKey key, DBData *data, va_list ap) return 0; } +/** + * @see DBApply + */ +static int npc_unload_ev_label(DBKey key, DBData *data, va_list ap) +{ + struct linkdb_node* label_linkdb = DB->data2ptr(data); + struct npc_data* nd = va_arg(ap, struct npc_data *); + + linkdb_erase(&label_linkdb, nd); + + return 0; +} + //Chk if npc matches src_id, then unload. //Sub-function used to find duplicates. static int npc_unload_dup_sub(struct npc_data* nd, va_list args) @@ -1831,8 +1831,10 @@ int npc_unload(struct npc_data* nd, bool single) { struct s_mapiterator* iter; struct block_list* bl; - if( single ) + if( single ) { ev_db->foreach(ev_db,npc_unload_ev,nd->exname); //Clean up all events related + ev_label_db->foreach(ev_label_db,npc_unload_ev_label,nd); + } iter = mapit_geteachpc(); for( bl = (struct block_list*)mapit->first(iter); mapit->exists(iter); bl = (struct block_list*)mapit->next(iter) ) { @@ -3732,17 +3734,25 @@ void npc_read_event_script(void) } } -void npc_clear_pathlist(void) { - struct npc_path_data *npd = NULL; - DBIterator *path_list = db_iterator(npc_path_db); - - /* free all npc_path_data filepaths */ - for( npd = dbi_first(path_list); dbi_exists(path_list); npd = dbi_next(path_list) ) { - if( npd->path ) - aFree(npd->path); - } +/** + * @see DBApply + */ +static int npc_path_db_clear_sub(DBKey key, DBData *data, va_list args) +{ + struct npc_path_data *npd = DB->data2ptr(data); + if (npd->path) + aFree(npd->path); + return 0; +} - dbi_destroy(path_list); +/** + * @see DBApply + */ +static int ev_label_db_clear_sub(DBKey key, DBData *data, va_list args) +{ + struct linkdb_node *label_linkdb = DB->data2ptr(data); + linkdb_final(&label_linkdb); // linked data (struct event_data*) is freed when clearing ev_db + return 0; } //Clear then reload npcs files @@ -3756,12 +3766,11 @@ int npc_reload(void) { /* clear guild flag cache */ guild->flags_clear(); - npc_clear_pathlist(); - - db_clear(npc_path_db); + npc_path_db->clear(npc_path_db, npc_path_db_clear_sub); db_clear(npcname_db); db_clear(ev_db); + ev_label_db->clear(ev_label_db, ev_label_db_clear_sub); npc_last_npd = NULL; npc_last_path = NULL; @@ -3876,16 +3885,17 @@ bool npc_unloadfile( const char* path ) { void do_clear_npc(void) { db_clear(npcname_db); db_clear(ev_db); + ev_label_db->clear(ev_label_db, ev_label_db_clear_sub); } /*========================================== * Destructor *------------------------------------------*/ int do_final_npc(void) { - npc_clear_pathlist(); - ev_db->destroy(ev_db, NULL); - npcname_db->destroy(npcname_db, NULL); - npc_path_db->destroy(npc_path_db, NULL); + db_destroy(ev_db); + ev_label_db->destroy(ev_label_db, ev_label_db_clear_sub); + db_destroy(npcname_db); + npc_path_db->destroy(npc_path_db, npc_path_db_clear_sub); ers_destroy(timer_event_ers); npc_clearsrcfile(); @@ -3952,9 +3962,10 @@ int do_init_npc(void) for( i = MAX_NPC_CLASS2_START; i < MAX_NPC_CLASS2_END; i++ ) npc_viewdb2[i - MAX_NPC_CLASS2_START].class_ = i; - ev_db = strdb_alloc((DBOptions)(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA),2*NAME_LENGTH+2+1); - npcname_db = strdb_alloc(DB_OPT_BASE,NAME_LENGTH); - npc_path_db = strdb_alloc(DB_OPT_BASE|DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA,0); + ev_db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, EVENT_NAME_LENGTH); + ev_label_db = stridb_alloc(DB_OPT_DUP_KEY, NAME_LENGTH); // data is linkdb and is fully released in ev_label_db_clear_sub + npcname_db = strdb_alloc(DB_OPT_BASE, NAME_LENGTH); + npc_path_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, 0); timer_event_ers = ers_new(sizeof(struct timer_event_data),"clif.c::timer_event_ers",ERS_OPT_NONE); diff --git a/src/map/pc.c b/src/map/pc.c index 0bd593930..84cfe7eb3 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2091,8 +2091,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val) case SP_BASE_ATK: if(sd->state.lr_flag != 2) { #ifdef RENEWAL - sd->bonus.eatk += val; - clif->updatestatus(sd,SP_ATK2); + status->equip_atk += val; #else bonus = status->batk + val; status->batk = cap_value(bonus, 0, USHRT_MAX); diff --git a/src/map/pc.h b/src/map/pc.h index 7f0e8cf46..58dd85083 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -327,7 +327,6 @@ struct map_session_data { int fixcastrate,varcastrate; int add_fixcast,add_varcast; int ematk; // matk bonus from equipment - int eatk; // atk bonus from equipment } bonus; // zeroed vars end here. int castrate,delayrate,hprate,sprate,dsprate; @@ -655,7 +654,7 @@ enum equip_pos { // clientside display macros (values to the left/right of the "+") #ifdef RENEWAL #define pc_leftside_atk(sd) ((sd)->battle_status.batk) - #define pc_rightside_atk(sd) ((sd)->battle_status.rhw.atk + (sd)->battle_status.lhw.atk + (sd)->battle_status.rhw.atk2 + (sd)->battle_status.lhw.atk2 + (sd)->bonus.eatk ) + #define pc_rightside_atk(sd) ((sd)->battle_status.rhw.atk + (sd)->battle_status.lhw.atk + (sd)->battle_status.rhw.atk2 + (sd)->battle_status.lhw.atk2 + (sd)->battle_status.equip_atk ) #define pc_leftside_def(sd) ((sd)->battle_status.def2) #define pc_rightside_def(sd) ((sd)->battle_status.def) #define pc_leftside_mdef(sd) ((sd)->battle_status.mdef2) diff --git a/src/map/skill.c b/src/map/skill.c index deb6643c1..1b350f74c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -744,10 +744,10 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint temp = skill->get_time2(iStatus->sc2skill(type),7); if (sd->addeff[i].flag&ATF_TARGET) - iStatus->change_start(bl,type,rate,7,0,0,0,temp,0); + iStatus->change_start(bl,type,rate,7,0,(type == SC_BURNING)?src->id:0,0,temp,0); if (sd->addeff[i].flag&ATF_SELF) - iStatus->change_start(src,type,rate,7,0,0,0,temp,0); + iStatus->change_start(src,type,rate,7,0,(type == SC_BURNING)?src->id:0,0,temp,0); } } diff --git a/src/map/status.c b/src/map/status.c index 20d88e296..0d8bedc5e 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4045,6 +4045,10 @@ void status_calc_bl_(struct block_list* bl, enum scb_flag flag, bool first) clif->updatestatus(sd,SP_HP); if(b_status.sp != status->sp) clif->updatestatus(sd,SP_SP); +#ifdef RENEWAL + if(b_status.equip_atk != status->equip_atk) + clif->updatestatus(sd,SP_ATK2); +#endif } else if( bl->type == BL_HOM ) { TBL_HOM* hd = BL_CAST(BL_HOM, bl); if( hd->master && memcmp(&b_status, status, sizeof(struct status_data)) != 0 ) diff --git a/src/map/status.h b/src/map/status.h index 11a78dc9f..5f8a515f6 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1632,6 +1632,9 @@ struct status_data { size, race; struct weapon_atk rhw, lhw; //Right Hand/Left Hand Weapon. +#ifdef RENEWAL + int equip_atk; +#endif }; //Additional regen data that only players have. |