From c2dc9e684c1493211f9653042294ff812caa760c Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Thu, 12 Dec 2013 23:19:22 +0700 Subject: [PATCH 01/21] Follow up fba3ed9, tq Euphy Signed-off-by: Cydh Ramdh --- db/re/item_db.txt | 2 +- sql-files/item_db_re.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 7c94a445d1..2b193593d1 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -8658,7 +8658,7 @@ 19730,C_Snake_Hat,C Snake Hat,5,20,,10,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,986,{},{},{} 19746,C_Executioner_Hood,Executioner Hood,5,20,,0,,0,,0,0xFFFFFFFF,63,2,2048,,0,0,0,{},{},{} 19829,C_Straw_Hat,C Straw Hat,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,146,{},{},{} -19853,C_Filir Wings,C Filir Wings,5,20,,0,,0,,0,0xFFFFFFFF,63,2,2048,,1,0,595,{ for (set .@i,0; .@i <= 12; set .@i,.@i+1) { bonus2 bExpAddRace,.@i,5; } },{},{} +19853,C_Filir Wings,C Filir Wings,5,20,,0,,0,,0,0xFFFFFFFF,63,2,2048,,1,0,595,{ bonus2 bExpAddRace,RC_Boss,5; bonus2 bExpAddRace,RC_NonBoss,5; },{},{} 19856,Costume_Snow_Cone_Hat,Costume Snow Cone Hat,5,10,,0,,0,,0,0xFFFFFFFF,63,2,1024,,1,0,0,{ bonus2 bAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bAddMonsterDropItem,11589,5; },{},{} 19857,Costume_Crayfish_Hat,Costume Crayfish Hat,5,10,,10,,0,,,0xFFFFFFFF,63,2,1024,,1,,,{},{},{} 19859,C_Flying_Angel,Flying Angel,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,264,{},{},{} diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 46e8640b2a..b9f0dbac9e 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -8689,7 +8689,7 @@ REPLACE INTO `item_db_re` VALUES (19707,'C_Polar_Bear_Cap','Costume Polar Bear C REPLACE INTO `item_db_re` VALUES (19730,'C_Snake_Hat','C Snake Hat',5,20,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,986,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19746,'C_Executioner_Hood','Executioner Hood',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'0',0,0,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19829,'C_Straw_Hat','C Straw Hat',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,146,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (19853,'C_Filir Wings','C Filir Wings',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',0,595,'for (set .@i,0; .@i <= 12; set .@i,.@i+1) { bonus2 bExpAddRace,.@i,5; }',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (19853,'C_Filir Wings','C Filir Wings',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',0,595,'bonus2 bExpAddRace,RC_Boss,5; bonus2 bExpAddRace,RC_NonBoss,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19856,'Costume_Snow_Cone_Hat','Costume Snow Cone Hat',5,10,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',0,0,'bonus2 bAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bAddMonsterDropItem,11589,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19857,'Costume_Crayfish_Hat','Costume Crayfish Hat',5,10,NULL,10,NULL,0,NULL,NULL,0xFFFFFFFF,63,2,1024,NULL,'1',NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19859,'C_Flying_Angel','Flying Angel',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,264,NULL,NULL,NULL); From 3541fae4bde7d2c6b9b81a35fc5955505185dd89 Mon Sep 17 00:00:00 2001 From: nanakiwurtz Date: Thu, 12 Dec 2013 23:37:39 +0700 Subject: [PATCH 02/21] New Items. Source: http://forums.irowiki.org/showpost.php?p=1367852&postcount=651 Signed-off-by: nanakiwurtz --- db/re/item_db.txt | 6 ++++++ sql-files/item_db_re.sql | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 54973d4ff8..fc017674e2 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -1975,6 +1975,8 @@ 2940,Ninja_Manual,Ninja Manual,5,0,,100,,0,,0,0x00000001,63,2,136,,0,0,0,{ bonus bMaxSP,100; skill "NJ_UTSUSEMI",1; skill "NJ_KOUENKA",1; skill "NJ_SYURIKEN",1; },{},{} 2941,Gunslinger_Manual,Gunslinger Manual,5,0,,100,,0,,0,0x00000001,63,2,136,,0,0,0,{ bonus bMaxSP,100; skill "GS_GLITTERING",1; skill "GS_ADJUSTMENT",1; skill "GS_MADNESSCANCEL",1; skill "GS_INCREASING",1; },{},{} 2942,Taekwon_Manual,Taekwon Manual,5,0,,100,,0,,0,0x00000001,63,2,136,,0,0,0,{ bonus bMaxSP,100; skill "TK_SEVENWIND",4; skill "TK_JUMPKICK",5; },{},{} +2957,Enhanced_Ring_of_Flame_Lord,Enhanced Ring of Flame Lord,5,10,,100,,0,,,0x7CCFDF80,63,2,136,,85,,,{ bonus bStr,3; bonus bVit,2; bonus bBaseAtk,20; bonus2 bSubEle,Ele_Fire,10; bonus3 bAutoSpell,"CH_SOULCOLLECT",1,30; bonus3 bAutoSpell,"MO_EXPLOSIONSPIRITS",1,10; bonus3 bAutoSpell,"PA_PRESSURE",2,30; bonus3 bAutoSpell,"MG_FIREBALL",1,150; bonus3 bAutoSpell,"KN_BOWLINGBASH",5,20; },{},{} +2958,Enhanced_Ring_of_Resonance,Enhanced Ring of Resonance,5,10,,100,,2,,,0x7CCFDF80,63,2,136,,85,,,{ bonus bAgi,3; bonus bVit,1; bonus bMdef,2; bonus bMatk,10; bonus4 bAutoSpellWhenHit,"WZ_QUAGMIRE",1,50,0; bonus3 bAutoSpellWhenHit,"AS_SPLASHER",10,20; bonus3 bAutoSpellWhenHit,"AL_HEAL",10,30; bonus3 bAutoSpellWhenHit,"HP_ASSUMPTIO",3,20; bonus3 bAutoSpellWhenHit,"CG_TAROTCARD",5,20; },{},{} 2959,Fidelity_Necklace,Fidelity Necklace,5,20,,300,,0,,1,0xFFFFFFFF,63,2,136,,50,0,0,{ bonus bAgi,2; bonus2 bSubRace,RC_Brute,3; },{},{} 2960,Badge_Of_Manny,Badge Of Manny,5,20,,200,,0,,1,0xFFFFFFFF,63,2,136,,0,0,0,{ bonus bAllStats,1; },{},{} 2966,RWC_2012_Ring,RWC 2012 Ring,5,20,,200,,0,,0,0xFFFFFFFF,63,2,136,,0,0,0,{ bonus2 bAddRace,RC_NonBoss,1; bonus2 bAddRace,RC_Boss,1; },{},{} @@ -8533,6 +8535,9 @@ 18758,Hat_Of_Scrat,Hat Of Scrat,5,20,,200,,3,,1,0xFFFFFFFF,63,2,256,,0,1,896,{},{},{} 18759,Stretched_Nose_M,Wood Goblin's Nose,5,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,50,0,737,{ bonus bUnbreakableHelm,0; },{},{} // +18766,Improved_Helm_of_Angel,Improved Helm of Angel,5,10,,1600,,10,,1,0x7CCFDF80,63,2,256,,99,1,,{ bonus bAgi,(getrefine()>=7?2:1); bonus bLuk,(getrefine()>=7?2:1); bonus bMdef,3; if(getrefine()>=9){bonus bAspd,1;}},{},{} +18767,Improved_Helm_Of_Sun,Improved Hat of the Sun God,5,10,,2400,,4,,1,0x7CCFDF80,63,2,768,,99,1,,{ bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;}; if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;} },{},{} +// 18779,RWC_Champ_Crown_First_Place,RWC Champ Crown First Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,902,{ bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5; },{},{} 18780,RWC_Champ_Crown_Second_Place,RWC Champ Crown Second Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,903,{ bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5; },{},{} 18781,RWC_Champ_Crown_Third_Place,RWC Champ Crown Third Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,904,{ bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,3; bonus bMdef,1; },{},{} @@ -8689,6 +8694,7 @@ 21005,Metal_Two_Hand_Sword,Metal Two Hand Sword,4,20,,0,95,,1,1,0x00004082,63,2,34,3,1,1,3,{ bonus bBaseAtk,(getrefine()*6); bonus bMatk,(getrefine()*2); set .@i,((BaseLevel/10)>12)?12:(BaseLevel/10); if(.@i>2) bonus bBaseAtk,((.@i-2)*5); },{},{} 21011,Gigantic_Blade,Gigantic Blade,3,10,,5000,300,,,,0xFFFFFFFF,56,2,2,4,130,1,3,{ bonus bUnbreakableWeapon,1; bonus bAspdRate,-5; if(readparam(bStr)<=110){ bonus bAtk,-250; } },{},{} // New Items +22014,Enhanced_Variant_Shoes,Enhanced Variant Shoes,3,10,,500,,13,,1,0x7CCFDF80,63,2,64,,85,1,,{ bonus bMaxHPrate,12; bonus bMaxSPrate,12; bonus bDef,getrefine(); bonus bMdef,getrefine(); },{},{} 22043,AGI_Complement,AGI Complement,5,10,,350,,25,,,0x00000400,56,2,64,,100,1,,{ bonus bAspdRate,5+(getrefine()/4); },{},{} 22044,Reinforced_Parts_Booster,Reinforced Parts - Booster,5,10,,1000,,23,,,0x00000400,56,2,64,,100,1,,{ bonus2 bSkillUseSP,"NC_HOVERING",15; if(getrefine()>=7){bonus2 bSkillUseSP,"NC_HOVERING",-20;} },{},{} 22045,Summer_Sandals,Summer Sandals,5,10,,200,,5,,0,0xFFFFFFFF,63,2,64,,0,1,0,{ bonus bFlee,5; bonus3 bAutoSpellWhenHit,"AL_INCAGI",10,50; },{},{} diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 946d1a2b3f..e1cd753407 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -2006,6 +2006,8 @@ REPLACE INTO `item_db_re` VALUES (2936,'Recovery_Ring','Recovery Ring',5,20,NULL REPLACE INTO `item_db_re` VALUES (2940,'Ninja_Manual','Ninja Manual',5,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "NJ_UTSUSEMI",1; skill "NJ_KOUENKA",1; skill "NJ_SYURIKEN",1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2941,'Gunslinger_Manual','Gunslinger Manual',5,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "GS_GLITTERING",1; skill "GS_ADJUSTMENT",1; skill "GS_MADNESSCANCEL",1; skill "GS_INCREASING",1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2942,'Taekwon_Manual','Taekwon Manual',5,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "TK_SEVENWIND",4; skill "TK_JUMPKICK",5;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2957,'Enhanced_Ring_of_Flame_Lord','Enhanced Ring of Flame Lord',5,10,NULL,100,NULL,0,NULL,NULL,0x7CCFDF80,63,2,136,NULL,'85',NULL,NULL,'bonus bStr,3; bonus bVit,2; bonus bBaseAtk,20; bonus2 bSubEle,Ele_Fire,10; bonus3 bAutoSpell,"CH_SOULCOLLECT",1,30; bonus3 bAutoSpell,"MO_EXPLOSIONSPIRITS",1,10; bonus3 bAutoSpell,"PA_PRESSURE",2,30; bonus3 bAutoSpell,"MG_FIREBALL",1,150; bonus3 bAutoSpell,"KN_BOWLINGBASH",5,20;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (2958,'Enhanced_Ring_of_Resonance','Enhanced Ring of Resonance',5,10,NULL,100,NULL,2,NULL,NULL,0x7CCFDF80,63,2,136,NULL,'85',NULL,NULL,'bonus bAgi,3; bonus bVit,1; bonus bMdef,2; bonus bMatk,10; bonus4 bAutoSpellWhenHit,"WZ_QUAGMIRE",1,50,0; bonus3 bAutoSpellWhenHit,"AS_SPLASHER",10,20; bonus3 bAutoSpellWhenHit,"AL_HEAL",10,30; bonus3 bAutoSpellWhenHit,"HP_ASSUMPTIO",3,20; bonus3 bAutoSpellWhenHit,"CG_TAROTCARD",5,20;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2959,'Fidelity_Necklace','Fidelity Necklace',5,20,NULL,300,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'50',0,0,'bonus bAgi,2; bonus2 bSubRace,RC_Brute,3;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2960,'Badge_Of_Manny','Badge Of Manny',5,20,NULL,200,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'0',0,0,'bonus bAllStats,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (2966,'RWC_2012_Ring','RWC 2012 Ring',5,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,136,NULL,'0',0,0,'bonus2 bAddRace,RC_NonBoss,1; bonus2 bAddRace,RC_Boss,1;',NULL,NULL); @@ -8564,6 +8566,9 @@ REPLACE INTO `item_db_re` VALUES (18756,'Black_Shiba_Inu_Hat','Black Shiba Inu H REPLACE INTO `item_db_re` VALUES (18758,'Hat_Of_Scrat','Hat Of Scrat',5,20,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,896,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (18759,'Stretched_Nose_M','Wood Goblin\'s Nose',5,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',0,737,'bonus bUnbreakableHelm,0;',NULL,NULL); # +REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',5,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,NULL,'bonus bAgi,(getrefine()>=7?2:1); bonus bLuk,(getrefine()>=7?2:1); bonus bMdef,3; if(getrefine()>=9){bonus bAspd,1;}',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18767,'Improved_Helm_Of_Sun','Improved Hat of the Sun God',5,10,NULL,2400,NULL,4,NULL,1,0x7CCFDF80,63,2,768,NULL,'99',1,NULL,'bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;}; if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;}',NULL,NULL); +# REPLACE INTO `item_db_re` VALUES (18779,'RWC_Champ_Crown_First_Place','RWC Champ Crown First Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,902,'bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18780,'RWC_Champ_Crown_Second_Place','RWC Champ Crown Second Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,903,'bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18781,'RWC_Champ_Crown_Third_Place','RWC Champ Crown Third Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,904,'bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,3; bonus bMdef,1;',NULL,NULL); @@ -8720,6 +8725,7 @@ REPLACE INTO `item_db_re` VALUES (21004,'Alca_Bringer_','Alca Bringer',4,20,NULL REPLACE INTO `item_db_re` VALUES (21005,'Metal_Two_Hand_Sword','Metal Two Hand Sword',4,20,NULL,0,'95',NULL,1,1,0x00004082,63,2,34,3,'1',1,3,'bonus bBaseAtk,(getrefine()*6); bonus bMatk,(getrefine()*2); set .@i,((BaseLevel/10)>12)?12:(BaseLevel/10); if(.@i>2) bonus bBaseAtk,((.@i-2)*5);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (21011,'Gigantic_Blade','Gigantic Blade',3,10,NULL,5000,'300',NULL,NULL,NULL,0xFFFFFFFF,56,2,2,4,'130',1,3,'bonus bUnbreakableWeapon,1; bonus bAspdRate,-5; if(readparam(bStr)<=110){ bonus bAtk,-250; }',NULL,NULL); # New Items +REPLACE INTO `item_db_re` VALUES (22014,'Enhanced_Variant_Shoes','Enhanced Variant Shoes',3,10,NULL,500,NULL,13,NULL,1,0x7CCFDF80,63,2,64,NULL,'85',1,NULL,'bonus bMaxHPrate,12; bonus bMaxSPrate,12; bonus bDef,getrefine(); bonus bMdef,getrefine();',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22043,'AGI_Complement','AGI Complement',5,10,NULL,350,NULL,25,NULL,NULL,0x00000400,56,2,64,NULL,'100',1,NULL,'bonus bAspdRate,5+(getrefine()/4);',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22044,'Reinforced_Parts_Booster','Reinforced Parts - Booster',5,10,NULL,1000,NULL,23,NULL,NULL,0x00000400,56,2,64,NULL,'100',1,NULL,'bonus2 bSkillUseSP,"NC_HOVERING",15; if(getrefine()>=7){bonus2 bSkillUseSP,"NC_HOVERING",-20;}',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22045,'Summer_Sandals','Summer Sandals',5,10,NULL,200,NULL,5,NULL,0,0xFFFFFFFF,63,2,64,NULL,'0',1,0,'bonus bFlee,5; bonus3 bAutoSpellWhenHit,"AL_INCAGI",10,50;',NULL,NULL); From 93d4b176fc9a0faa64162b345a89baf2deb3d074 Mon Sep 17 00:00:00 2001 From: nanakiwurtz Date: Thu, 12 Dec 2013 23:50:28 +0700 Subject: [PATCH 03/21] * Follow up to http://forums.irowiki.org/showpost.php?p=1367852&postcount=651 Signed-off-by: nanakiwurtz --- db/re/item_db.txt | 2 +- sql-files/item_db_re.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index fc017674e2..628c6edab4 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -8536,7 +8536,7 @@ 18759,Stretched_Nose_M,Wood Goblin's Nose,5,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,50,0,737,{ bonus bUnbreakableHelm,0; },{},{} // 18766,Improved_Helm_of_Angel,Improved Helm of Angel,5,10,,1600,,10,,1,0x7CCFDF80,63,2,256,,99,1,,{ bonus bAgi,(getrefine()>=7?2:1); bonus bLuk,(getrefine()>=7?2:1); bonus bMdef,3; if(getrefine()>=9){bonus bAspd,1;}},{},{} -18767,Improved_Helm_Of_Sun,Improved Hat of the Sun God,5,10,,2400,,4,,1,0x7CCFDF80,63,2,768,,99,1,,{ bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;}; if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;} },{},{} +18767,Improved_Helm_Of_Sun,Improved Hat of the Sun God,5,10,,2400,,4,,1,0x7CCFDF80,63,2,768,,99,1,,{ bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;}; if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;}; },{},{} // 18779,RWC_Champ_Crown_First_Place,RWC Champ Crown First Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,902,{ bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5; },{},{} 18780,RWC_Champ_Crown_Second_Place,RWC Champ Crown Second Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,903,{ bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5; },{},{} diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index e1cd753407..d0280039f0 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -8567,7 +8567,7 @@ REPLACE INTO `item_db_re` VALUES (18758,'Hat_Of_Scrat','Hat Of Scrat',5,20,NULL, REPLACE INTO `item_db_re` VALUES (18759,'Stretched_Nose_M','Wood Goblin\'s Nose',5,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',0,737,'bonus bUnbreakableHelm,0;',NULL,NULL); # REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',5,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,NULL,'bonus bAgi,(getrefine()>=7?2:1); bonus bLuk,(getrefine()>=7?2:1); bonus bMdef,3; if(getrefine()>=9){bonus bAspd,1;}',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18767,'Improved_Helm_Of_Sun','Improved Hat of the Sun God',5,10,NULL,2400,NULL,4,NULL,1,0x7CCFDF80,63,2,768,NULL,'99',1,NULL,'bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;}; if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;}',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18767,'Improved_Helm_Of_Sun','Improved Hat of the Sun God',5,10,NULL,2400,NULL,4,NULL,1,0x7CCFDF80,63,2,768,NULL,'99',1,NULL,'bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;}; if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;};',NULL,NULL); # REPLACE INTO `item_db_re` VALUES (18779,'RWC_Champ_Crown_First_Place','RWC Champ Crown First Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,902,'bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18780,'RWC_Champ_Crown_Second_Place','RWC Champ Crown Second Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,903,'bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL); From 45951b68642c978bf8c6521a6a7329b5699077a1 Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Fri, 13 Dec 2013 00:17:11 +0700 Subject: [PATCH 04/21] Added items from http://forums.irowiki.org/showpost.php?p=1373816&postcount=769 Signed-off-by: Cydh Ramdh --- db/re/item_db.txt | 10 +++++++--- db/re/item_misc.txt | 2 +- db/re/item_trade.txt | 9 +++++++++ sql-files/item_db_re.sql | 10 +++++++--- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 2b193593d1..3048409042 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -7668,9 +7668,12 @@ 14613,RWC_Scroll_2012,RWC Scroll 2012,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} 14614,Ex_Def_Potion,Ex Def Potion,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} // -14616,STR_Biscuit_Stick,Bar of Strength,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} -14617,VIT_Biscuit_Stick,Bar of Fitness,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} -14618,AGI_Biscuit_Stick,Bar of Agility,2,0,,10,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} +14616,STR_Biscuit_Stick,Bar Cookie Of Strength,18,1,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_STRFOOD,1800000,15; sc_start SC_INCATKRATE,600000,rand(11,111); },{},{} +14617,VIT_Biscuit_Stick,Bar Cookie Of Vitality,18,1,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_INCVIT,1800000,15; /*sc_start SC_INCDEFRATE,600000,rand(11,33);*/ },{},{} +14618,AGI_Biscuit_Stick,Bar Cookie Of Agility,18,1,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_AGIFOOD,1800000,15; sc_start SC_INCFLEE,600000,rand(11,33); },{},{} +14619,INT_Biscuit_Stick,Bar Cookie Of Intelligence,18,1,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_INTFOOD,1800000,15; sc_start SC_INCMATKRATE,600000,rand(11,111); },{},{} +14620,DEX_Biscuit_Stick,Bar Cookie Of Dexterity,18,1,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_DEXFOOD,1800000,15; sc_start SC_INCHIT,600000,rand(11,33); },{},{} +14621,LUK_Biscuit_Stick,Bar Cookie Of Lucky,18,1,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_LUKFOOD,1800000,15; sc_start SC_INCCRI,600000,rand(11,33); },{},{} //14626,Indigo_Scroll //14643,Violet_Scroll //14664,Bi_Hwang_Scroll @@ -8269,6 +8272,7 @@ 17338,Ore_Box_V,Ore Box V,18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 7619,5; getitem 7620,5; getitem 14696,1; },{},{} 17339,Ore_Box_V(10),Ore Box V(10),18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 7619,50; getitem 7620,50; getitem 14696,11; },{},{} //17394,Event_Old_Headgear_Box,Event Old Headgear Box,2,20,,50,,,,,0xFFFFFFFF,63,2,,,,,,{ /* TODO */ },{},{} +17449,Cookies_Bar_Set,Set Bar Cookies,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ for (set .@i,14616; .@i <= 14621; set .@i,.@i+1) getitem .@i,1; },{},{} // Mechanic/Genetic Cannonballs 18000,Cannon_Ball,Cannon Ball,10,100,,10,100,,,,0x00040400,56,2,32768,,99,,8,{},{},{} 18001,Holy_Cannon_Ball,Holy Cannon Ball,10,200,,10,120,,,,0x00040400,56,2,32768,,99,,8,{ bonus bAtkEle,Ele_Holy; },{},{} diff --git a/db/re/item_misc.txt b/db/re/item_misc.txt index 3024977852..60ecf77395 100644 --- a/db/re/item_misc.txt +++ b/db/re/item_misc.txt @@ -1217,4 +1217,4 @@ // Flamel Card 70,545,1 // Condensed Red Potion 70,546,1 // Condensed Yellow Potion -70,547,1 // Condensed White Potion \ No newline at end of file +70,547,1 // Condensed White Potion diff --git a/db/re/item_trade.txt b/db/re/item_trade.txt index b7849cd89d..bae5addae2 100644 --- a/db/re/item_trade.txt +++ b/db/re/item_trade.txt @@ -2080,5 +2080,14 @@ // kRO 2013-10-08 22675,475,100 +// kRO 2013-11-06 +17449,475,100 +14616,475,100 +14617,475,100 +14618,475,100 +14619,475,100 +14620,475,100 +14621,475,100 + // kRO 2013-11-13 16628,475,100 diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index b9f0dbac9e..1907f94a11 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -7699,9 +7699,12 @@ REPLACE INTO `item_db_re` VALUES (14612,'M_Mdef_Potion','M Mdef Potion',11,0,NUL REPLACE INTO `item_db_re` VALUES (14613,'RWC_Scroll_2012','RWC Scroll 2012',2,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (14614,'Ex_Def_Potion','Ex Def Potion',2,0,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); # -REPLACE INTO `item_db_re` VALUES (14616,'STR_Biscuit_Stick','Bar of Strength',2,0,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (14617,'VIT_Biscuit_Stick','Bar of Fitness',2,0,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (14618,'AGI_Biscuit_Stick','Bar of Agility',2,0,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (14616,'STR_Biscuit_Stick','Bar Cookie Of Strength',18,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_STRFOOD,1800000,15; sc_start SC_INCATKRATE,600000,rand(11,111);',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (14617,'VIT_Biscuit_Stick','Bar Cookie Of Vitality',18,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_INCVIT,1800000,15; /*sc_start SC_INCDEFRATE,600000,rand(11,33);*/',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (14618,'AGI_Biscuit_Stick','Bar Cookie Of Agility',18,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_AGIFOOD,1800000,15; sc_start SC_INCFLEE,600000,rand(11,33);',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (14619,'INT_Biscuit_Stick','Bar Cookie Of Intelligence',18,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFOOD,1800000,15; sc_start SC_INCMATKRATE,600000,rand(11,111);',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (14620,'DEX_Biscuit_Stick','Bar Cookie Of Dexterity',18,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEXFOOD,1800000,15; sc_start SC_INCHIT,600000,rand(11,33);',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (14621,'LUK_Biscuit_Stick','Bar Cookie Of Lucky',18,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_LUKFOOD,1800000,15; sc_start SC_INCCRI,600000,rand(11,33);',NULL,NULL); #14626,Indigo_Scroll #14643,Violet_Scroll #14664,Bi_Hwang_Scroll @@ -8300,6 +8303,7 @@ REPLACE INTO `item_db_re` VALUES (17271,'VIT_Biscuit_Stick_Box','VIT Biscuit Sti REPLACE INTO `item_db_re` VALUES (17338,'Ore_Box_V','Ore Box V',18,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getitem 7619,5; getitem 7620,5; getitem 14696,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (17339,'Ore_Box_V(10)','Ore Box V(10)',18,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getitem 7619,50; getitem 7620,50; getitem 14696,11;',NULL,NULL); #REPLACE INTO `item_db_re` VALUES (17394,'Event_Old_Headgear_Box','Event Old Headgear Box',2,20,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'/* TODO */',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (17449,'Cookies_Bar_Set','Set Bar Cookies',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'for (set .@i,14616; .@i <= 14621; set .@i,.@i+1) getitem .@i,1;',NULL,NULL); # Mechanic/Genetic Cannonballs REPLACE INTO `item_db_re` VALUES (18000,'Cannon_Ball','Cannon Ball',10,100,NULL,10,'100',NULL,NULL,NULL,0x00040400,56,2,32768,NULL,'99',NULL,8,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (18001,'Holy_Cannon_Ball','Holy Cannon Ball',10,200,NULL,10,'120',NULL,NULL,NULL,0x00040400,56,2,32768,NULL,'99',NULL,8,'bonus bAtkEle,Ele_Holy;',NULL,NULL); From 056af72f217b837fed15e4eb0f189a1a2d54b4f7 Mon Sep 17 00:00:00 2001 From: nanakiwurtz Date: Fri, 13 Dec 2013 01:43:47 +0700 Subject: [PATCH 05/21] * Follow up 93d4b176 --- db/re/item_db.txt | 2 +- sql-files/item_db_re.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 628c6edab4..6a4d5ef37f 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -8536,7 +8536,7 @@ 18759,Stretched_Nose_M,Wood Goblin's Nose,5,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,50,0,737,{ bonus bUnbreakableHelm,0; },{},{} // 18766,Improved_Helm_of_Angel,Improved Helm of Angel,5,10,,1600,,10,,1,0x7CCFDF80,63,2,256,,99,1,,{ bonus bAgi,(getrefine()>=7?2:1); bonus bLuk,(getrefine()>=7?2:1); bonus bMdef,3; if(getrefine()>=9){bonus bAspd,1;}},{},{} -18767,Improved_Helm_Of_Sun,Improved Hat of the Sun God,5,10,,2400,,4,,1,0x7CCFDF80,63,2,768,,99,1,,{ bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;}; if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;}; },{},{} +18767,Improved_Helm_Of_Sun,Improved Hat of the Sun God,5,10,,2400,,4,,1,0x7CCFDF80,63,2,768,,99,1,,{ bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;} if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;} },{},{} // 18779,RWC_Champ_Crown_First_Place,RWC Champ Crown First Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,902,{ bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5; },{},{} 18780,RWC_Champ_Crown_Second_Place,RWC Champ Crown Second Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,903,{ bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5; },{},{} diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index d0280039f0..91fe91c0e0 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -8567,7 +8567,7 @@ REPLACE INTO `item_db_re` VALUES (18758,'Hat_Of_Scrat','Hat Of Scrat',5,20,NULL, REPLACE INTO `item_db_re` VALUES (18759,'Stretched_Nose_M','Wood Goblin\'s Nose',5,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',0,737,'bonus bUnbreakableHelm,0;',NULL,NULL); # REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',5,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,NULL,'bonus bAgi,(getrefine()>=7?2:1); bonus bLuk,(getrefine()>=7?2:1); bonus bMdef,3; if(getrefine()>=9){bonus bAspd,1;}',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18767,'Improved_Helm_Of_Sun','Improved Hat of the Sun God',5,10,NULL,2400,NULL,4,NULL,1,0x7CCFDF80,63,2,768,NULL,'99',1,NULL,'bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;}; if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;};',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18767,'Improved_Helm_Of_Sun','Improved Hat of the Sun God',5,10,NULL,2400,NULL,4,NULL,1,0x7CCFDF80,63,2,768,NULL,'99',1,NULL,'bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;} if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;}',NULL,NULL); # REPLACE INTO `item_db_re` VALUES (18779,'RWC_Champ_Crown_First_Place','RWC Champ Crown First Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,902,'bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18780,'RWC_Champ_Crown_Second_Place','RWC Champ Crown Second Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,903,'bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL); From dab21907b67ddd7285d61b3009d5cf604937ecf9 Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Fri, 13 Dec 2013 13:27:32 +0700 Subject: [PATCH 06/21] Fixed bugreport http://rathena.org/board/tracker/issue-8334-the-mapflag-of-monk-in-should-exclude-nosavesavepoint/ Thank t79979119 and exneval Signed-off-by: Cydh Ramdh --- npc/mapflag/nosave.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/npc/mapflag/nosave.txt b/npc/mapflag/nosave.txt index 26c0251665..ce5a2e5d3f 100644 --- a/npc/mapflag/nosave.txt +++ b/npc/mapflag/nosave.txt @@ -31,7 +31,6 @@ job_cru mapflag nosave SavePoint job_duncer mapflag nosave SavePoint job_monk mapflag nosave SavePoint monk_test mapflag nosave SavePoint -monk_in mapflag nosave SavePoint in_rogue mapflag nosave SavePoint job_sage mapflag nosave SavePoint // Ext From c81607f1ca2b352f5b65d48a05f61ac855a3c25f Mon Sep 17 00:00:00 2001 From: Lilith- Date: Fri, 13 Dec 2013 00:53:56 -0800 Subject: [PATCH 07/21] Added missed items from http://forums.irowiki.org/showpost.php?p=1366277&postcount=624 and http://forums.irowiki.org/showpost.php?p=1367371&postcount=636 --- db/const.txt | 1 + db/quest_db.txt | 70 +++++++++++++++++++++++++++++++++++++++- db/re/item_db.txt | 5 ++- db/re/mob_db.txt | 1 + sql-files/item_db_re.sql | 3 ++ 5 files changed, 78 insertions(+), 2 deletions(-) diff --git a/db/const.txt b/db/const.txt index a9f66f9bd5..6e7ebd09cf 100644 --- a/db/const.txt +++ b/db/const.txt @@ -789,6 +789,7 @@ IG_CardAlbum_Shoes 66 IG_CardAlbum_Shield 67 IG_CardAlbum_Weapon 68 IG_CardAlbum_Garment 69 +IG_Flamel_Card 70 SC_ALL -1 SC_STONE 0 diff --git a/db/quest_db.txt b/db/quest_db.txt index 8b7eacb346..81d408fb32 100644 --- a/db/quest_db.txt +++ b/db/quest_db.txt @@ -599,7 +599,9 @@ 4263,0,0,0,0,0,0,0,"Counteroffensive (1)" 4264,0,0,0,0,0,0,0,"Counteroffensive (2)" 4265,0,0,0,0,0,0,0,"Bookshelf use" - +//4303,0,0,0,0,0,0,0,"" +//4304,0,0,0,0,0,0,0,"" +//4305,0,0,0,0,0,0,0,"" 5000,0,0,0,0,0,0,0,"The Crow of the Fate - 7" // Researcher's Quest @@ -1595,6 +1597,15 @@ 9260,0,0,0,0,0,0,0,"Survey investigation notes" 9262,0,0,0,0,0,0,0,"Mystery Robbery Incident 16" +//9327,0,0,0,0,0,0,0,"" +//9328,0,0,0,0,0,0,0,"" +//9329,0,0,0,0,0,0,0,"" +//9330,0,0,0,0,0,0,0,"" +//9331,0,0,0,0,0,0,0,"" +//9332,0,0,0,0,0,0,0,"" +//9333,0,0,0,0,0,0,0,"" +//9334,0,0,0,0,0,0,0,"" + 10000,0,0,0,0,0,0,0,"To the Prontera Royal Court" 10001,0,0,0,0,0,0,0,"Qualification Test" 10002,0,0,0,0,0,0,0,"Qualification Review" @@ -2356,6 +2367,63 @@ 14140,0,0,0,0,0,0,0,"To Wuhari" 14141,0,0,0,0,0,0,0,"Ingredients for research" +//14254,0,0,0,0,0,0,0,"" +//14255,0,0,0,0,0,0,0,"" +//14256,0,0,0,0,0,0,0,"" +//14257,0,0,0,0,0,0,0,"" +//14258,0,0,0,0,0,0,0,"" +//14259,0,0,0,0,0,0,0,"" +//14260,0,0,0,0,0,0,0,"" +//14261,0,0,0,0,0,0,0,"" +//14262,0,0,0,0,0,0,0,"" +//14263,0,0,0,0,0,0,0,"" +//14264,0,0,0,0,0,0,0,"" +//14265,0,0,0,0,0,0,0,"" +//14266,0,0,0,0,0,0,0,"" +//14267,0,0,0,0,0,0,0,"" +//14268,0,0,0,0,0,0,0,"" +//14269,0,0,0,0,0,0,0,"" +//14270,0,0,0,0,0,0,0,"" +//14271,0,0,0,0,0,0,0,"" +//14272,0,0,0,0,0,0,0,"" +//14273,0,0,0,0,0,0,0,"" +//14275,0,0,0,0,0,0,0,"" +//14276,0,0,0,0,0,0,0,"" +//14277,0,0,0,0,0,0,0,"" +//14278,0,0,0,0,0,0,0,"" +//14279,0,0,0,0,0,0,0,"" +//14280,0,0,0,0,0,0,0,"" +//14281,0,0,0,0,0,0,0,"" +//14282,0,0,0,0,0,0,0,"" +//14283,0,0,0,0,0,0,0,"" +//14284,0,0,0,0,0,0,0,"" +//14285,0,0,0,0,0,0,0,"" +//14286,0,0,0,0,0,0,0,"" +//14287,0,0,0,0,0,0,0,"" +//14288,0,0,0,0,0,0,0,"" +//14289,0,0,0,0,0,0,0,"" +//14290,0,0,0,0,0,0,0,"" +//14291,0,0,0,0,0,0,0,"" +//15025,0,0,0,0,0,0,0,"" +//15026,0,0,0,0,0,0,0,"" +//15027,0,0,0,0,0,0,0,"" +//15028,0,0,0,0,0,0,0,"" +//15029,0,0,0,0,0,0,0,"" +//15030,0,0,0,0,0,0,0,"" +//15031,0,0,0,0,0,0,0,"" +//15032,0,0,0,0,0,0,0,"" +//15033,0,0,0,0,0,0,0,"" +//15034,0,0,0,0,0,0,0,"" +//15035,0,0,0,0,0,0,0,"" +//15036,0,0,0,0,0,0,0,"" +//15037,0,0,0,0,0,0,0,"" +//15038,0,0,0,0,0,0,0,"" +//15039,0,0,0,0,0,0,0,"" +//15040,0,0,0,0,0,0,0,"" +//15041,0,0,0,0,0,0,0,"" +//15043,0,0,0,0,0,0,0,"" +//15045,0,0,0,0,0,0,0,"" + 16000,0,0,0,0,0,0,0,"Metz Brayde's Notice" 16001,0,0,0,0,0,0,0,"First examination" 16002,0,0,0,0,0,0,0,"Fetching Items for Arian -1" diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 3048409042..702b86d713 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -8661,10 +8661,11 @@ 19707,C_Polar_Bear_Cap,Costume Polar Bear Cap,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,966,{ bonus bUnbreakableHelm,0; },{},{} 19730,C_Snake_Hat,C Snake Hat,5,20,,10,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,986,{},{},{} 19746,C_Executioner_Hood,Executioner Hood,5,20,,0,,0,,0,0xFFFFFFFF,63,2,2048,,0,0,0,{},{},{} +19777,C_Shiny_Small_Star,Shiny Small Star,5,20,,10,,0,,0,0xFFFFFFFF,63,2,1024,,1,0,0,{},{},{} 19829,C_Straw_Hat,C Straw Hat,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,146,{},{},{} 19853,C_Filir Wings,C Filir Wings,5,20,,0,,0,,0,0xFFFFFFFF,63,2,2048,,1,0,595,{ bonus2 bExpAddRace,RC_Boss,5; bonus2 bExpAddRace,RC_NonBoss,5; },{},{} 19856,Costume_Snow_Cone_Hat,Costume Snow Cone Hat,5,10,,0,,0,,0,0xFFFFFFFF,63,2,1024,,1,0,0,{ bonus2 bAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bAddMonsterDropItem,11589,5; },{},{} -19857,Costume_Crayfish_Hat,Costume Crayfish Hat,5,10,,10,,0,,,0xFFFFFFFF,63,2,1024,,1,,,{},{},{} +19857,Costume_Crayfish_Hat,Costume Crayfish Hat,5,10,,10,,0,,,0xFFFFFFFF,63,2,1024,,1,0,0,{},{},{} 19859,C_Flying_Angel,Flying Angel,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,264,{},{},{} 19860,C_School_Criatura_Hat,School Criatura Hat,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,0,{},{},{} 19861,C_Heart_Hairpin,Heart Hairpin,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,126,{},{},{} @@ -8719,6 +8720,8 @@ 22648,Angel_Ring_Package,Angel Ring Package,3,10,,10,,,,,,,,,,,,,{},{},{} 22649,Devil_Ring_Package,Devil Ring Package,3,10,,10,,,,,,,,,,,,,{},{},{} 22652,Briliant_Hat_Box,Brilliant Hat Box,2,10,,200,,,,,0xFFFFFFFF,63,2,,,,,,{ /* TODO */ },{},{} +22653,Wet_Card_Album,Wet Card Album,2,10000,,50,,,,,0xFFFFFFFF,63,2,,,,,,{ /* TODO */ },{},{} +22654,Golden_Seal_Card,Golden Seal Card,3,20,,50,,,,,,,,,,,,,{},{},{} 22675,Mysterious_Scroll,Mysterious Scroll,2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_INTFOOD,3600000,30; },{},{} 22676,Hangul_Day_Event_Box,Hangul Day Event Box,2,20,,0,,,,,0xFFFFFFFF,63,2,,,0,,,{ getitem 22675,10; getitem 607,9; },{},{} diff --git a/db/re/mob_db.txt b/db/re/mob_db.txt index ca18156373..b7b6fb1043 100644 --- a/db/re/mob_db.txt +++ b/db/re/mob_db.txt @@ -2276,6 +2276,7 @@ //3154,RECON_ROBOT //3155,REPAIR_ROBOT //3156,EXPLORATION_ROVER +//3166,M_E_DEVILING // //3201,JT_LUCKYCASE //3202,JT_ORGANIC_JAKK diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 1907f94a11..017fb7962a 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -8692,6 +8692,7 @@ REPLACE INTO `item_db_re` VALUES (19656,'C_Wandering_Minstrel_Hat','Wandering Mi REPLACE INTO `item_db_re` VALUES (19707,'C_Polar_Bear_Cap','Costume Polar Bear Cap',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,966,'bonus bUnbreakableHelm,0;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19730,'C_Snake_Hat','C Snake Hat',5,20,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,986,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19746,'C_Executioner_Hood','Executioner Hood',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'0',0,0,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (19777,'Shiny_Small_Star','Shiny Small Star',5,20,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',0,0,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19829,'C_Straw_Hat','C Straw Hat',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,146,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19853,'C_Filir Wings','C Filir Wings',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',0,595,'bonus2 bExpAddRace,RC_Boss,5; bonus2 bExpAddRace,RC_NonBoss,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19856,'Costume_Snow_Cone_Hat','Costume Snow Cone Hat',5,10,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',0,0,'bonus2 bAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bAddMonsterDropItem,11589,5;',NULL,NULL); @@ -8750,6 +8751,8 @@ REPLACE INTO `item_db_re` VALUES (22621,'Barbecued_Squid','Barbecued Squid',3,10 REPLACE INTO `item_db_re` VALUES (22648,'Angel_Ring_Package','Angel Ring Package',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (22649,'Devil_Ring_Package','Devil Ring Package',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (22652,'Briliant_Hat_Box','Brilliant Hat Box',2,10,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'/* TODO */',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22653,'Wet_Card_Album','Wet Card Album',2,10000,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'/* TODO */',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (22654,'Golden_Seal_Card','Golden Seal Card',3,20,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (22675,'Mysterious_Scroll','Mysterious Scroll',2,20,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_INTFOOD,3600000,30;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (22676,'Hangul_Day_Event_Box','Hangul Day Event Box',2,20,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,'0',NULL,NULL,'getitem 22675,10; getitem 607,9;',NULL,NULL); From 3b81f0b26376f668fe238419864751d7c453a531 Mon Sep 17 00:00:00 2001 From: nanakiwurtz Date: Fri, 13 Dec 2013 23:15:50 +0700 Subject: [PATCH 08/21] * Changed item script for "Improved Helm of Angel" Signed-off-by: nanakiwurtz --- db/re/item_db.txt | 2 +- sql-files/item_db_re.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 6a4d5ef37f..b95c32b9fa 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -8535,7 +8535,7 @@ 18758,Hat_Of_Scrat,Hat Of Scrat,5,20,,200,,3,,1,0xFFFFFFFF,63,2,256,,0,1,896,{},{},{} 18759,Stretched_Nose_M,Wood Goblin's Nose,5,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,50,0,737,{ bonus bUnbreakableHelm,0; },{},{} // -18766,Improved_Helm_of_Angel,Improved Helm of Angel,5,10,,1600,,10,,1,0x7CCFDF80,63,2,256,,99,1,,{ bonus bAgi,(getrefine()>=7?2:1); bonus bLuk,(getrefine()>=7?2:1); bonus bMdef,3; if(getrefine()>=9){bonus bAspd,1;}},{},{} +18766,Improved_Helm_of_Angel,Improved Helm of Angel,5,10,,1600,,10,,1,0x7CCFDF80,63,2,256,,99,1,,{ bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1; },{},{} 18767,Improved_Helm_Of_Sun,Improved Hat of the Sun God,5,10,,2400,,4,,1,0x7CCFDF80,63,2,768,,99,1,,{ bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;} if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;} },{},{} // 18779,RWC_Champ_Crown_First_Place,RWC Champ Crown First Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,902,{ bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5; },{},{} diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 91fe91c0e0..d5c47c385e 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -8566,7 +8566,7 @@ REPLACE INTO `item_db_re` VALUES (18756,'Black_Shiba_Inu_Hat','Black Shiba Inu H REPLACE INTO `item_db_re` VALUES (18758,'Hat_Of_Scrat','Hat Of Scrat',5,20,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,896,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (18759,'Stretched_Nose_M','Wood Goblin\'s Nose',5,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',0,737,'bonus bUnbreakableHelm,0;',NULL,NULL); # -REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',5,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,NULL,'bonus bAgi,(getrefine()>=7?2:1); bonus bLuk,(getrefine()>=7?2:1); bonus bMdef,3; if(getrefine()>=9){bonus bAspd,1;}',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',5,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,NULL,'bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18767,'Improved_Helm_Of_Sun','Improved Hat of the Sun God',5,10,NULL,2400,NULL,4,NULL,1,0x7CCFDF80,63,2,768,NULL,'99',1,NULL,'bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;} if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;}',NULL,NULL); # REPLACE INTO `item_db_re` VALUES (18779,'RWC_Champ_Crown_First_Place','RWC Champ Crown First Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,902,'bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL); From 0f2dd7fcf0e498aec2d281b80e31fa5b0c6c68ec Mon Sep 17 00:00:00 2001 From: aleos89 Date: Fri, 13 Dec 2013 15:24:04 -0500 Subject: [PATCH 09/21] * Cleaned up a mercenary kill check. (bugreport:2222) Bug Fixes * Adjusted script commands that use script_isstring and script_isint to use script_getdata to dereference if variable is given. (bugreport:8198) * Removed the hardcoded password so that users can pass blank passwords through the config for MySQL. (bugreport:7787) * Increased the hostname array to account for longer hostnames. (bugreport:8003) * Fixed the CashShop not listing items correctly. (bugreport:7585) * Fixed Offertorium not consuming the correct amount of SP. (bugreport:8266) * Cart Boost effect stays even if the cart is removed. Revert of change in r16339. (bugreport:5808) --- src/char/inter.c | 2 +- src/common/mmo.h | 2 + src/login/account_sql.c | 2 +- src/map/clif.c | 45 +++++++----- src/map/mob.c | 2 +- src/map/pc.c | 6 +- src/map/script.c | 149 ++++++++++++++++++++++++++++++---------- src/map/status.c | 2 +- 8 files changed, 151 insertions(+), 59 deletions(-) diff --git a/src/char/inter.c b/src/char/inter.c index 47921a6352..124babad86 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -37,7 +37,7 @@ Sql* sql_handle = NULL; int char_server_port = 3306; char char_server_ip[32] = "127.0.0.1"; char char_server_id[32] = "ragnarok"; -char char_server_pw[32] = "ragnarok"; +char char_server_pw[32] = ""; // Allow user to send empty password (bugreport:7787) char char_server_db[32] = "ragnarok"; char default_codepage[32] = ""; //Feature by irmin. diff --git a/src/common/mmo.h b/src/common/mmo.h index b2dfd35d6a..67e82ebd87 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -407,6 +407,8 @@ struct mmo_charstatus { // Char server addon system unsigned int character_moves; + + bool cashshop_sent; // Whether the player has received the CashShop list }; typedef enum mail_status { diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 34525e9701..2f7568f6fd 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -23,7 +23,7 @@ typedef struct AccountDB_SQL Sql* accounts; // SQL accounts storage // global sql settings - char global_db_hostname[32]; + char global_db_hostname[64]; // Doubled for long hostnames (bugreport:8003) uint16 global_db_port; char global_db_username[32]; char global_db_password[32]; diff --git a/src/map/clif.c b/src/map/clif.c index 48d4e8cf98..06abafb44a 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2485,10 +2485,12 @@ void clif_equiplist(struct map_session_data *sd) void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length) { + static const int client_buf = 0x5000; // Max buffer to send struct item_data *id; - int i,n,ne; + int i,n,ne,nn; unsigned char *buf; unsigned char *bufe; + unsigned char *bufn; #if PACKETVER < 5 const int s = 10; //Entry size.normal item const int sidx=4; //start itemlist idx @@ -2533,33 +2535,39 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items n++; } } - if( n ) + for (i = 0; i < n;) // Loop through non-equipable items { + nn = n - i < (client_buf - 4)/s ? n - i : (client_buf - 4)/s; // Split up non-equipable items + bufn = buf + i*s; // Update buffer to new index range + i += nn; #if PACKETVER < 5 - WBUFW(buf,0)=0xa5; + WBUFW(bufn,0)=0xa5; #elif PACKETVER < 20080102 - WBUFW(buf,0)=0x1f0; + WBUFW(bufn,0)=0x1f0; #elif PACKETVER < 20120925 - WBUFW(buf,0)=0x2ea; + WBUFW(bufn,0)=0x2ea; #else - WBUFW(buf,0)=0x995; + WBUFW(bufn,0)=0x995; memset((char*)WBUFP(buf,4),0,24); //storename #endif - WBUFW(buf,2)=n*s+sidx; - clif_send(buf, WBUFW(buf,2), &sd->bl, SELF); + WBUFW(bufn,2)=4+nn*s; + clif_send(bufn, WBUFW(bufn,2), &sd->bl, SELF); } - if( ne ) + for (i = 0; i < ne;) // Loop through equipable items { + nn = ne - i < (client_buf - 4)/se ? ne - i : (client_buf - 4)/se; // Split up equipable items + bufn = bufe + i*se; // Update buffer to new index range + i += nn; #if PACKETVER < 20071002 - WBUFW(bufe,0)=0xa6; + WBUFW(bufn,0)=0xa6; #elif PACKETVER < 20120925 - WBUFW(bufe,0)=0x2d1; + WBUFW(bufn,0)=0x2d1; #else - WBUFW(bufe,0)=0x996; - memset((char*)WBUFP(bufe,4),0,24); //storename + WBUFW(bufn,0)=0x996; + memset((char*)WBUFP(bufn,4),0,24); //storename #endif - WBUFW(bufe,2)=ne*se+sidxe; - clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF); + WBUFW(bufn,2)=4+nn*se; + clif_send(bufn, WBUFW(bufn,2), &sd->bl, SELF); } if( buf ) aFree(buf); @@ -14801,7 +14809,7 @@ void clif_cashshop_list( int fd ){ int tab; for( tab = CASHSHOP_TAB_NEW; tab < CASHSHOP_TAB_SEARCH; tab++ ){ - int length = 8 + cash_shop_items->count * 6; + int length = 8 + cash_shop_items[tab].count * 6; int i, offset; WFIFOHEAD( fd, length ); @@ -14820,7 +14828,10 @@ void clif_cashshop_list( int fd ){ } void clif_parse_cashshop_list_request( int fd, struct map_session_data* sd ){ - clif_cashshop_list( fd ); + if( !sd->status.cashshop_sent ) { + clif_cashshop_list( fd ); + sd->status.cashshop_sent = true; + } } /// List of items offered in a cash shop (ZC_PC_CASH_POINT_ITEMLIST). /// 0287 .W .L { .L .L .B .W }* diff --git a/src/map/mob.c b/src/map/mob.c index 55c78514eb..aaebb2d378 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2598,7 +2598,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) else if( sd->avail_quests ) quest_update_objective(sd, md->class_); - if( sd->md && src && src->type != BL_HOM && mob_db(md->class_)->lv > sd->status.base_level/2 ) + if( sd->md && src && src->type == BL_MER && mob_db(md->class_)->lv > sd->status.base_level/2 ) mercenary_kills(sd->md); } diff --git a/src/map/pc.c b/src/map/pc.c index d4e0a2ae44..d1eb8fcb2e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1141,6 +1141,9 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim } #endif + // Player has not yet received the CashShop list + sd->status.cashshop_sent = false; + // Request all registries (auth is considered completed whence they arrive) intif_request_registry(sd,7); return true; @@ -7932,9 +7935,6 @@ int pc_setcart(struct map_session_data *sd,int type) { if( pc_checkskill(sd,MC_PUSHCART) <= 0 && type != 0 ) return 1;// Push cart is required - if( type == 0 && pc_iscarton(sd) ) - status_change_end(&sd->bl,SC_GN_CARTBOOST,INVALID_TIMER); - #ifdef NEW_CARTS switch( type ) { diff --git a/src/map/script.c b/src/map/script.c index 335930ea58..b18bada48c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -6103,7 +6103,7 @@ BUILDIN_FUNC(countitem) } data = script_getdata(st,2); - get_val(st, data); // convert into value in case of a variable + get_val(st, data); // Convert into value in case of a variable if( data_isstring(data) ) // item name id = itemdb_searchname(conv_str(st, data)); @@ -6220,7 +6220,7 @@ BUILDIN_FUNC(checkweight) for(i=2; iud.skilltimer != INVALID_TIMER ) return 0; - id = ( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); + data = script_getdata(st, 2); + get_val(st, data); // Convert into value in case of a variable + id = ( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); lv = script_getnum(st,3); sd->skillitem=id; @@ -12599,6 +12627,7 @@ BUILDIN_FUNC(petheal) BUILDIN_FUNC(petskillattack) { struct pet_data *pd; + struct script_data *data; TBL_PC *sd=script_rid2sd(st); if(sd==NULL || sd->pd==NULL) @@ -12608,7 +12637,9 @@ BUILDIN_FUNC(petskillattack) if (pd->a_skill == NULL) pd->a_skill = (struct pet_skill_attack *)aMalloc(sizeof(struct pet_skill_attack)); - pd->a_skill->id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); + data = script_getdata(st, 2); + get_val(st, data); // Convert into value in case of a variable + pd->a_skill->id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); pd->a_skill->lv=script_getnum(st,3); pd->a_skill->div_ = 0; pd->a_skill->rate=script_getnum(st,4); @@ -12624,6 +12655,7 @@ BUILDIN_FUNC(petskillattack) BUILDIN_FUNC(petskillattack2) { struct pet_data *pd; + struct script_data *data; TBL_PC *sd=script_rid2sd(st); if(sd==NULL || sd->pd==NULL) @@ -12633,7 +12665,9 @@ BUILDIN_FUNC(petskillattack2) if (pd->a_skill == NULL) pd->a_skill = (struct pet_skill_attack *)aMalloc(sizeof(struct pet_skill_attack)); - pd->a_skill->id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); + data = script_getdata(st, 2); + get_val(st, data); // Convert into value in case of a variable + pd->a_skill->id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); pd->a_skill->lv=script_getnum(st,3); pd->a_skill->div_ = script_getnum(st,4); pd->a_skill->rate=script_getnum(st,5); @@ -12649,6 +12683,7 @@ BUILDIN_FUNC(petskillattack2) BUILDIN_FUNC(petskillsupport) { struct pet_data *pd; + struct script_data *data; TBL_PC *sd=script_rid2sd(st); if(sd==NULL || sd->pd==NULL) @@ -12667,7 +12702,9 @@ BUILDIN_FUNC(petskillsupport) } else //init memory pd->s_skill = (struct pet_skill_support *) aMalloc(sizeof(struct pet_skill_support)); - pd->s_skill->id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); + data = script_getdata(st, 2); + get_val(st, data); // Convert into value in case of a variable + pd->s_skill->id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); pd->s_skill->lv=script_getnum(st,3); pd->s_skill->delay=script_getnum(st,4); pd->s_skill->hp=script_getnum(st,5); @@ -12689,9 +12726,12 @@ BUILDIN_FUNC(petskillsupport) BUILDIN_FUNC(skilleffect) { TBL_PC *sd; + uint16 skill_id, skill_lv; + struct script_data *data = script_getdata(st, 2); - uint16 skill_id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); - uint16 skill_lv=script_getnum(st,3); + get_val(st, data); // Convert into value in case of a variable + skill_id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); + skill_lv=script_getnum(st,3); sd=script_rid2sd(st); clif_skill_nodamage(&sd->bl,&sd->bl,skill_id,skill_lv,1); @@ -12706,11 +12746,15 @@ BUILDIN_FUNC(skilleffect) BUILDIN_FUNC(npcskilleffect) { struct block_list *bl= map_id2bl(st->oid); + uint16 skill_id, skill_lv; + int x, y; + struct script_data *data = script_getdata(st, 2); - uint16 skill_id=( script_isstring(st,2) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); - uint16 skill_lv=script_getnum(st,3); - int x=script_getnum(st,4); - int y=script_getnum(st,5); + get_val(st, data); // Convert into value in case of a variable + skill_id=( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) ); + skill_lv=script_getnum(st,3); + x=script_getnum(st,4); + y=script_getnum(st,5); if (bl) clif_skill_poseffect(bl,skill_id,skill_lv,x,y,gettick()); @@ -12955,7 +12999,10 @@ BUILDIN_FUNC(recovery) case 4: { struct s_mapiterator *iter; - if(script_hasdata(st,3) && !script_isstring(st,3)) + struct script_data *data = script_getdata(st, 3); + + get_val(st, data); // Convert into value in case of a variable + if(script_hasdata(st,3) && !data_isstring(data)) revive = script_getnum(st,3); // recovery 4,; iter = mapit_getallusers(); for (sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter)) { @@ -14517,7 +14564,10 @@ BUILDIN_FUNC(replacestr) } if(script_hasdata(st, 5)) { - if( !script_isstring(st,5) ) + struct script_data *data = script_getdata(st, 5); + + get_val(st, data); // Convert into value in case of a variable + if( !data_isstring(data) ) usecase = script_getnum(st, 5) != 0; else { ShowError("script:replacestr: Invalid usecase value. Expected int got string\n"); @@ -14598,7 +14648,11 @@ BUILDIN_FUNC(countstr) } if(script_hasdata(st, 4)) { - if( !script_isstring(st,4) ) + struct script_data *data; + + data = script_getdata(st, 4); + get_val(st, data); // Convert into value in case of a variable + if( !data_isstring(data) ) usecase = script_getnum(st, 4) != 0; else { ShowError("script:countstr: Invalid usecase value. Expected int got string\n"); @@ -15167,9 +15221,12 @@ BUILDIN_FUNC(setitemscript) BUILDIN_FUNC(addmonsterdrop) { struct mob_db *mob; + struct script_data *data; int item_id,rate,i,c = 0; - if(script_isstring(st,2)) + data = script_getdata(st, 2); + get_val(st, data); // Convert into value in case of a variable + if(data_isstring(data)) mob = mob_db(mobdb_searchname(script_getstr(st,2))); else mob = mob_db(script_getnum(st,2)); @@ -15219,9 +15276,12 @@ BUILDIN_FUNC(addmonsterdrop) BUILDIN_FUNC(delmonsterdrop) { struct mob_db *mob; + struct script_data *data; int item_id,i; - if(script_isstring(st,2)) + data = script_getdata(st, 2); + get_val(st, data); // Convert into value in case of a variable + if(data_isstring(data)) mob = mob_db(mobdb_searchname(script_getstr(st,2))); else mob = mob_db(script_getnum(st,2)); @@ -15764,9 +15824,12 @@ BUILDIN_FUNC(unitskilluseid) uint16 skill_lv; int target_id; struct block_list* bl; + struct script_data *data; unit_id = script_getnum(st,2); - skill_id = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) ); + data = script_getdata(st, 3); + get_val(st, data); // Convert into value in case of a variable + skill_id = ( data_isstring(data) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) ); skill_lv = script_getnum(st,4); target_id = ( script_hasdata(st,5) ? script_getnum(st,5) : unit_id ); @@ -15789,9 +15852,12 @@ BUILDIN_FUNC(unitskillusepos) int skill_x; int skill_y; struct block_list* bl; + struct script_data *data; unit_id = script_getnum(st,2); - skill_id = ( script_isstring(st,3) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) ); + data = script_getdata(st, 3); + get_val(st, data); // Convert into value in case of a variable + skill_id = ( data_isstring(data) ? skill_name2id(script_getstr(st,3)) : script_getnum(st,3) ); skill_lv = script_getnum(st,4); skill_x = script_getnum(st,5); skill_y = script_getnum(st,6); @@ -16921,6 +16987,7 @@ static int buildin_mobuseskill_sub(struct block_list *bl,va_list ap) BUILDIN_FUNC(areamobuseskill) { struct block_list center; + struct script_data *data; int16 m; int range,mobid,skill_id,skill_lv,casttime,emotion,target,cancel; @@ -16934,7 +17001,9 @@ BUILDIN_FUNC(areamobuseskill) center.y = script_getnum(st,4); range = script_getnum(st,5); mobid = script_getnum(st,6); - skill_id = ( script_isstring(st,7) ? skill_name2id(script_getstr(st,7)) : script_getnum(st,7) ); + data = script_getdata(st, 7); + get_val(st, data); // Convert into value in case of a variable + skill_id = ( data_isstring(data) ? skill_name2id(script_getstr(st,7)) : script_getnum(st,7) ); if( (skill_lv = script_getnum(st,8)) > battle_config.mob_max_skilllvl ) skill_lv = battle_config.mob_max_skilllvl; @@ -17218,9 +17287,13 @@ BUILDIN_FUNC(getcharip) /* check if a character name is specified */ if( script_hasdata(st, 2) ) { - if (script_isstring(st, 2)) + struct script_data *data; + + data = script_getdata(st, 2); + get_val(st, data); // Convert into value in case of a variable + if (data_isstring(data)) sd = map_nick2sd(script_getstr(st, 2)); - else if (script_isint(st, 2) || script_getnum(st, 2)) + else if (data_isint(data) || script_getnum(st, 2)) { int id = 0; id = script_getnum(st, 2); @@ -17527,8 +17600,11 @@ BUILDIN_FUNC(npcskill) unsigned int npc_level; struct npc_data *nd; struct map_session_data *sd; - - skill_id = script_isstring(st, 2) ? skill_name2id(script_getstr(st, 2)) : script_getnum(st, 2); + struct script_data *data; + + data = script_getdata(st, 2); + get_val(st, data); // Convert into value in case of a variable + skill_id = data_isstring(data) ? skill_name2id(script_getstr(st, 2)) : script_getnum(st, 2); skill_level = script_getnum(st, 3); stat_point = script_getnum(st, 4); npc_level = script_getnum(st, 5); @@ -18041,11 +18117,14 @@ BUILDIN_FUNC(montransform) { enum sc_type type; char msg[CHAT_SIZE_MAX]; int tick, mob_id, val1, val2, val3, val4; + struct script_data *data; if( (sd = script_rid2sd(st)) == NULL ) return 1; - if( script_isstring(st, 2) ) + data = script_getdata(st, 2); + get_val(st, data); // Convert into value in case of a variable + if( data_isstring(data) ) mob_id = mobdb_searchname(script_getstr(st, 2)); else mob_id = mobdb_checkid(script_getnum(st, 2)); @@ -18055,7 +18134,7 @@ BUILDIN_FUNC(montransform) { val1 = val2 = val3 = val4 = 0; if (mob_id == 0) { - if( script_isstring(st,2) ) + if( data_isstring(data) ) ShowWarning("buildin_montransform: Attempted to use non-existing monster '%s'.\n", script_getstr(st, 2)); else ShowWarning("buildin_montransform: Attempted to use non-existing monster of ID '%d'.\n", script_getnum(st, 2)); diff --git a/src/map/status.c b/src/map/status.c index 2886766333..a1215455e4 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -9279,7 +9279,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty break; case SC_OFFERTORIUM: val2 = 30 * val1; // heal power bonus - val3 = 20 * val1; // sp cost inc + val3 = 100 + (20 * val1); // sp cost inc break; case SC_FRIGG_SONG: val2 = 5 * val1; // maxhp bonus From 43c21ad66770513fe5068d03165ce3c9e539e9b2 Mon Sep 17 00:00:00 2001 From: exneval Date: Sat, 14 Dec 2013 13:40:23 +0700 Subject: [PATCH 10/21] *Fix bugreport http://rathena.org/board/tracker/issue-8337-all-hidecloaking-skills-in-pvpduelwoe/ --- conf/battle/client.conf | 13 +++++++++---- src/map/battle.c | 1 + src/map/battle.h | 1 + src/map/clif.c | 3 ++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/conf/battle/client.conf b/conf/battle/client.conf index 1f9629e287..47e42416a5 100644 --- a/conf/battle/client.conf +++ b/conf/battle/client.conf @@ -139,7 +139,7 @@ motd_type: 0 display_version: yes // When affected with the "Hallucination" status effect, send the effect to client? (Note 1) -// Note: Set to 'no' if the client lags due to the "Wavy" screen effect. +// NOTE: Set to 'no' if the client lags due to the "Wavy" screen effect. display_hallucination: yes // Set this to 1 if your client supports status change timers and you want to use them @@ -155,9 +155,14 @@ client_reshuffle_dice: yes // NOTE: Enabling this option degrades performance. client_sort_storage: no -// Do we allow to change guilde emblem during woe_time ? +// Do we allow to change guilde emblem during woe_time? emblem_woe_change: yes -// How many transparent pixel can be found in emblem before detected as invalid ? -// Note 2 +// How many transparent pixel can be found in emblem before detected as invalid ? (Note 2) emblem_transparency_limit: 80 + +// Update enemy position while in invisible state? (Note 1) +// NOTE: Set to 'no' will make client won't update enemy position unless the players have "Intravision" effect. +// So that will help client handling WPE - Maya Purple Hack stuff. +// But it will screw 'the game animation display' while players in invisible state. +update_enemy_position: yes diff --git a/src/map/battle.c b/src/map/battle.c index 0e168dd05e..6521a5923f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7262,6 +7262,7 @@ static const struct _battle_data { { "emblem_woe_change", &battle_config.emblem_woe_change, 0, 0, 1, }, { "emblem_transparency_limit", &battle_config.emblem_transparency_limit, 80, 0, 100, }, { "discount_item_point_shop", &battle_config.discount_item_point_shop, 0, 0, 3, }, + { "update_enemy_position", &battle_config.update_enemy_position, 0, 0, 1, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index b4cde53f4a..a51fbc13ab 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -513,6 +513,7 @@ extern struct Battle_Config int emblem_woe_change; int emblem_transparency_limit; int discount_item_point_shop; + int update_enemy_position; } battle_config; void do_init_battle(void); diff --git a/src/map/clif.c b/src/map/clif.c index 48d4e8cf98..ea60b91b7f 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -326,7 +326,8 @@ static int clif_send_sub(struct block_list *bl, va_list ap) return 0; /* unless visible, hold it here */ - if (clif_ally_only && !sd->special_state.intravision && battle_check_target(src_bl,&sd->bl,BCT_ENEMY) > 0) + if (!battle_config.update_enemy_position && clif_ally_only && !sd->special_state.intravision && + !sd->sc.data[SC_INTRAVISION] && battle_check_target(src_bl,&sd->bl,BCT_ENEMY) > 0) return 0; WFIFOHEAD(fd, len); From fc763367db03cad16eda6705b1b072f04dbf1a35 Mon Sep 17 00:00:00 2001 From: exneval Date: Sat, 14 Dec 2013 14:13:01 +0700 Subject: [PATCH 11/21] *Fix bugreport http://rathena.org/board/tracker/issue-8332-npc-dark-breath/ --- conf/battle/client.conf | 2 +- db/pre-re/skill_db.txt | 2 +- db/re/skill_db.txt | 2 +- src/map/battle.c | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/battle/client.conf b/conf/battle/client.conf index 47e42416a5..1ae050e7fc 100644 --- a/conf/battle/client.conf +++ b/conf/battle/client.conf @@ -158,7 +158,7 @@ client_sort_storage: no // Do we allow to change guilde emblem during woe_time? emblem_woe_change: yes -// How many transparent pixel can be found in emblem before detected as invalid ? (Note 2) +// How many transparent pixel can be found in emblem before detected as invalid? (Note 2) emblem_transparency_limit: 80 // Update enemy position while in invisible state? (Note 1) diff --git a/db/pre-re/skill_db.txt b/db/pre-re/skill_db.txt index 669e233fb5..f547f95048 100644 --- a/db/pre-re/skill_db.txt +++ b/db/pre-re/skill_db.txt @@ -308,7 +308,7 @@ 199,9,6,1,7,0x40,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_BLOODDRAIN,Sucking Blood 200,9,6,1,7,0,0,1,1,no,0,0x2,0,magic,0,0x0, NPC_ENERGYDRAIN,Energy Drain 201,0,0,4,0,0x1,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_KEEPING,Keeping -202,9,6,1,7,0,0,5,1,no,0,0x2,0,misc,0,0x0, NPC_DARKBREATH,Dark Breath +202,9,6,1,7,0xC0,0,5,1,no,0,0x2,0,misc,0,0x0, NPC_DARKBREATH,Dark Breath 203,9,6,1,7,0x1,0,10,1,no,0,0x2,0,magic,0,0x0, NPC_DARKBLESSING,Dark Blessing 204,0,0,4,0,0x1,0,1,1,no,0,0x2,0,magic,0,0x0, NPC_BARRIER,Barrier 205,0,0,4,0,0x1,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_DEFENDER,Defender diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt index efca12fe0c..92713863d6 100644 --- a/db/re/skill_db.txt +++ b/db/re/skill_db.txt @@ -307,7 +307,7 @@ 199,9,6,1,7,0x40,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_BLOODDRAIN,Sucking Blood 200,9,6,1,7,0,0,1,1,no,0,0x2,0,magic,0,0x0, NPC_ENERGYDRAIN,Energy Drain 201,0,0,4,0,0x1,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_KEEPING,Keeping -202,9,6,1,7,0,0,5,1,no,0,0x2,0,misc,0,0x0, NPC_DARKBREATH,Dark Breath +202,9,6,1,7,0xC0,0,5,1,no,0,0x2,0,misc,0,0x0, NPC_DARKBREATH,Dark Breath 203,9,6,1,7,0x1,0,10,1,no,0,0x2,0,magic,0,0x0, NPC_DARKBLESSING,Dark Blessing 204,0,0,4,0,0x1,0,1,1,no,0,0x2,0,magic,0,0x0, NPC_BARRIER,Barrier 205,0,0,4,0,0x1,0,1,1,no,0,0x2,0,weapon,0,0x0, NPC_DEFENDER,Defender diff --git a/src/map/battle.c b/src/map/battle.c index 6521a5923f..3f03adec6e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5551,8 +5551,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * md.damage=3; break; case NPC_DARKBREATH: - md.damage = 500 + (skill_lv-1)*1000 + rnd()%1000; - if(md.damage > 9999) md.damage = 9999; + md.damage = tstatus->max_hp * (skill_lv * 10) / 100; break; case PA_PRESSURE: md.damage=500+300*skill_lv; From 7f6afa84b01a9adff3f8b4f2618aa1e6db001be3 Mon Sep 17 00:00:00 2001 From: exneval Date: Sat, 14 Dec 2013 14:20:19 +0700 Subject: [PATCH 12/21] *Fix bugreport http://rathena.org/board/tracker/issue-8107-dual-wield-problem/ --- src/map/battle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/map/battle.c b/src/map/battle.c index 3f03adec6e..0f75cc932e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4694,7 +4694,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl case KO_HAPPOKUNAI: break; default: - wd.damage += battle_calc_cardfix(BF_WEAPON, src, target, battle_skill_get_damage_properties(skill_id, wd.miscflag), right_element, left_element, wd.damage, is_attack_left_handed(src, skill_id), wd.flag); + wd.damage += battle_calc_cardfix(BF_WEAPON, src, target, battle_skill_get_damage_properties(skill_id, wd.miscflag), right_element, left_element, wd.damage, 0, wd.flag); + if(is_attack_left_handed(src, skill_id)) + wd.damage2 += battle_calc_cardfix(BF_WEAPON, src, target, battle_skill_get_damage_properties(skill_id, wd.miscflag), right_element, left_element, wd.damage2, 1, wd.flag); break; } } From bb3173c0bfe6c60f88da6a7426e0ecf9e073eb9b Mon Sep 17 00:00:00 2001 From: Rekiem Date: Sat, 14 Dec 2013 15:52:35 -0500 Subject: [PATCH 13/21] Update item_db.txt when ejecute the server the console show me error from line 8545 the error is (getrefine>=7)have a missing () --- db/re/item_db.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index f6fc4b1e14..20eb83d1bb 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -8542,7 +8542,7 @@ 18758,Hat_Of_Scrat,Hat Of Scrat,5,20,,200,,3,,1,0xFFFFFFFF,63,2,256,,0,1,896,{},{},{} 18759,Stretched_Nose_M,Wood Goblin's Nose,5,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,50,0,737,{ bonus bUnbreakableHelm,0; },{},{} // -18766,Improved_Helm_of_Angel,Improved Helm of Angel,5,10,,1600,,10,,1,0x7CCFDF80,63,2,256,,99,1,,{ bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1; },{},{} +18766,Improved_Helm_of_Angel,Improved Helm of Angel,5,10,,1600,,10,,1,0x7CCFDF80,63,2,256,,99,1,,{ bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine()>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1; },{},{} 18767,Improved_Helm_Of_Sun,Improved Hat of the Sun God,5,10,,2400,,4,,1,0x7CCFDF80,63,2,768,,99,1,,{ bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;} if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;} },{},{} // 18779,RWC_Champ_Crown_First_Place,RWC Champ Crown First Place,5,20,,500,,12,,,0xFFFFFFFF,63,2,256,,1,,902,{ bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5; },{},{} From a872bd2fb4b9eeea01a88df5b966514c9b5b8979 Mon Sep 17 00:00:00 2001 From: Rekiem Date: Sat, 14 Dec 2013 20:32:47 -0500 Subject: [PATCH 14/21] Update bard_quest.txt --- npc/quests/bard_quest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/quests/bard_quest.txt b/npc/quests/bard_quest.txt index 639dc3baad..c1dccab0c2 100644 --- a/npc/quests/bard_quest.txt +++ b/npc/quests/bard_quest.txt @@ -1929,7 +1929,7 @@ morocc,134,111,3 script Bard#3 741,{ mes "There's no reason to be afraid of this riffraff, your Uncle Kino is here, okay?"; } else if (BaseClass == Job_Assassin) { mes "There's no reason to be afraid. I know that person looks scary, but you're a good girl, so you'll be okay."; - } else if (BaeClass == Job_Blacksmith) { + } else if (BaseClass == Job_Blacksmith) { mes "There's no reason to be scared, honey. It's just a Blacksmith."; } else { mes "There's no reason to be scared. See...? That person won't hurt you."; From 4d8558489b16631618951507d03e6ea025d1c771 Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Mon, 16 Dec 2013 10:57:40 +0700 Subject: [PATCH 15/21] [db/re/item_db.txt] Fixed 18742 and 18744 class. 7 to 63 Signed-off-by: Cydh Ramdh --- db/re/item_db.txt | 4 ++-- sql-files/item_db_re.sql | 8 ++++---- sql-files/mob_db_re.sql | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 20eb83d1bb..69b3e8d1cc 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -8527,9 +8527,9 @@ 18737,Fortier_Mask,Fortier Masque,5,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,10,0,876,{ bonus bUnbreakableHelm,0; },{},{} 18739,Carnation_Hairband,Carnation Hairband,5,20,,100,,0,,0,0xFFFFFFFF,63,2,256,,0,1,878,{ bonus bLuk,1; },{},{} 18740,Hair_Of_The_Strong,Hair Of The Strong,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,879,{},{},{} -18742,C_MoonStar_Accessory,Moon and Stars,5,20,,0,,0,,0,0xFFFFFFFF,7,2,2048,,0,0,881,{},{ sc_start SC_MOONSTAR,-1,0; },{ sc_end SC_MOONSTAR; } +18742,C_MoonStar_Accessory,Moon and Stars,5,20,,0,,0,,0,0xFFFFFFFF,63,2,2048,,0,0,881,{},{ sc_start SC_MOONSTAR,-1,0; },{ sc_end SC_MOONSTAR; } 18743,Spirit_Of_Chung_E,Spirit Of Chung E,5,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,882,{},{},{} -18744,C_World_Star,Twilight,5,20,,0,,0,,0,0xFFFFFFFF,7,2,2048,,0,0,883,{},{ sc_start SC_SUPER_STAR,-1,0; },{ sc_end SC_SUPER_STAR; } +18744,C_World_Star,Twilight,5,20,,0,,0,,0,0xFFFFFFFF,63,2,2048,,0,0,883,{},{ sc_start SC_SUPER_STAR,-1,0; },{ sc_end SC_SUPER_STAR; } 18745,Choco_Stick_In_Mouth,Choco Stick In Mouth,5,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,10,0,884,{},{},{} 18746,Chilly_Breath,Chilly Breath,5,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,10,0,885,{ bonus bInt,1; },{},{} 18747,Eyes_Of_Ifrit,Eyes Of Ifrit,5,20,,100,,1,,1,0xFFFFFFFF,63,2,512,,0,0,886,{ bonus bDex,1; },{},{} diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 682402d245..3cfb67316b 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -8558,9 +8558,9 @@ REPLACE INTO `item_db_re` VALUES (18730,'Cryptura_Academy_Hat','Cryptura Academy REPLACE INTO `item_db_re` VALUES (18737,'Fortier_Mask','Fortier Masque',5,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'10',0,876,'bonus bUnbreakableHelm,0;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18739,'Carnation_Hairband','Carnation Hairband',5,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,256,NULL,'0',1,878,'bonus bLuk,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18740,'Hair_Of_The_Strong','Hair Of The Strong',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,879,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18742,'C_MoonStar_Accessory','Moon and Stars',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,7,2,2048,NULL,'0',0,881,NULL,'sc_start SC_MOONSTAR,-1,0;','sc_end SC_MOONSTAR;'); +REPLACE INTO `item_db_re` VALUES (18742,'C_MoonStar_Accessory','Moon and Stars',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'0',0,881,NULL,'sc_start SC_MOONSTAR,-1,0;','sc_end SC_MOONSTAR;'); REPLACE INTO `item_db_re` VALUES (18743,'Spirit_Of_Chung_E','Spirit Of Chung E',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,882,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (18744,'C_World_Star','Twilight',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,7,2,2048,NULL,'0',0,883,NULL,'sc_start SC_SUPER_STAR,-1,0;','sc_end SC_SUPER_STAR;'); +REPLACE INTO `item_db_re` VALUES (18744,'C_World_Star','Twilight',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'0',0,883,NULL,'sc_start SC_SUPER_STAR,-1,0;','sc_end SC_SUPER_STAR;'); REPLACE INTO `item_db_re` VALUES (18745,'Choco_Stick_In_Mouth','Choco Stick In Mouth',5,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'10',0,884,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (18746,'Chilly_Breath','Chilly Breath',5,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'10',0,885,'bonus bInt,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18747,'Eyes_Of_Ifrit','Eyes Of Ifrit',5,20,NULL,100,NULL,1,NULL,1,0xFFFFFFFF,63,2,512,NULL,'0',0,886,'bonus bDex,1;',NULL,NULL); @@ -8697,11 +8697,11 @@ REPLACE INTO `item_db_re` VALUES (19656,'C_Wandering_Minstrel_Hat','Wandering Mi REPLACE INTO `item_db_re` VALUES (19707,'C_Polar_Bear_Cap','Costume Polar Bear Cap',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,966,'bonus bUnbreakableHelm,0;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19730,'C_Snake_Hat','C Snake Hat',5,20,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,986,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19746,'C_Executioner_Hood','Executioner Hood',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'0',0,0,NULL,NULL,NULL); -REPLACE INTO `item_db_re` VALUES (19777,'Shiny_Small_Star','Shiny Small Star',5,20,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',0,0,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (19777,'C_Shiny_Small_Star','Shiny Small Star',5,20,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',0,0,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19829,'C_Straw_Hat','C Straw Hat',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,146,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19853,'C_Filir Wings','C Filir Wings',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',0,595,'bonus2 bExpAddRace,RC_Boss,5; bonus2 bExpAddRace,RC_NonBoss,5;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (19856,'Costume_Snow_Cone_Hat','Costume Snow Cone Hat',5,10,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',0,0,'bonus2 bAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bAddMonsterDropItem,11589,5;',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (19857,'Costume_Crayfish_Hat','Costume Crayfish Hat',5,10,NULL,10,NULL,0,NULL,NULL,0xFFFFFFFF,63,2,1024,NULL,'1',NULL,NULL,NULL,NULL,NULL); +REPLACE INTO `item_db_re` VALUES (19857,'Costume_Crayfish_Hat','Costume Crayfish Hat',5,10,NULL,10,NULL,0,NULL,NULL,0xFFFFFFFF,63,2,1024,NULL,'1',0,0,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19859,'C_Flying_Angel','Flying Angel',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,264,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19860,'C_School_Criatura_Hat','School Criatura Hat',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,0,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (19861,'C_Heart_Hairpin','Heart Hairpin',5,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,126,NULL,NULL,NULL); diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql index 586edcaa11..5aa3fc8f8b 100644 --- a/sql-files/mob_db_re.sql +++ b/sql-files/mob_db_re.sql @@ -2342,6 +2342,7 @@ REPLACE INTO `mob_db` VALUES (2476,'MG_AMDARAIS','Amdarias','Amdarias',143,32839 #3154,RECON_ROBOT #3155,REPAIR_ROBOT #3156,EXPLORATION_ROVER +#3166,M_E_DEVILING # #3201,JT_LUCKYCASE #3202,JT_ORGANIC_JAKK From 54dfc6792556f886a326cdb002abcb08441b1475 Mon Sep 17 00:00:00 2001 From: Lilith- Date: Mon, 16 Dec 2013 05:04:52 -0800 Subject: [PATCH 16/21] * Fixed bug http://rathena.org/board/tracker/issue-8330-secure-npctimeout-bug-for-those-npc-who-have-no-dialog-window/ Merged Hercules adc2e6e --- src/map/clif.c | 18 +++++++++++++++++- src/map/clif.h | 1 + src/map/pc.c | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/map/clif.c b/src/map/clif.c index 7986fce60c..301c6846c1 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1919,6 +1919,22 @@ void clif_scriptclose(struct map_session_data *sd, int npcid) WFIFOSET(fd,packet_len(0xb6)); } +/// [Ind/Hercules] +/// Close script when player is idle +/// 08d6 .L +void clif_scriptclear(struct map_session_data *sd, int npcid) +{ + int fd; + + nullpo_retv(sd); + + fd=sd->fd; + WFIFOHEAD(fd, packet_len(0x8d6)); + WFIFOW(fd,0)=0x8d6; + WFIFOL(fd,2)=npcid; + WFIFOSET(fd,packet_len(0x8d6)); + } + /*========================================== * *------------------------------------------*/ @@ -17541,7 +17557,7 @@ void packetdb_readdb(void) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //#0x08C0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, - 9, 7, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 9, 7, 10, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //#0x0900 diff --git a/src/map/clif.h b/src/map/clif.h index 8c42ac85de..8c0a3a2ac7 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -392,6 +392,7 @@ void clif_selllist(struct map_session_data *sd); //self void clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes); //self void clif_scriptnext(struct map_session_data *sd,int npcid); //self void clif_scriptclose(struct map_session_data *sd, int npcid); //self +void clif_scriptclear(struct map_session_data *sd, int npcid); //self void clif_scriptmenu(struct map_session_data* sd, int npcid, const char* mes); //self void clif_scriptinput(struct map_session_data *sd, int npcid); //self void clif_scriptinputstr(struct map_session_data *sd, int npcid); // self diff --git a/src/map/pc.c b/src/map/pc.c index d1eb8fcb2e..c85469b858 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6750,6 +6750,7 @@ void pc_close_npc(struct map_session_data *sd,int flag) sd->npc_idle_timer = INVALID_TIMER; #endif clif_scriptclose(sd,sd->npc_id); + clif_scriptclear(sd,sd->npc_id); // [Ind/Hercules] if(sd->st && sd->st->state == END ) {// free attached scripts that are waiting script_free_state(sd->st); sd->st = NULL; From a29aace9c503faf8abdaee25cb14fe6c512dca44 Mon Sep 17 00:00:00 2001 From: Lilith- Date: Mon, 16 Dec 2013 06:46:21 -0800 Subject: [PATCH 17/21] Follow up bd2503e,7355677 and fef6307. Merged Hercules e115c30 --- src/map/atcommand.c | 3 ++- src/map/pc.c | 8 ++++---- src/map/status.c | 6 ++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 4010d236e6..07c518fc88 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2103,9 +2103,10 @@ ACMD_FUNC(refine) refine = cap_value(refine, -MAX_REFINE, MAX_REFINE); count = 0; - for (j = 0; j < EQI_MAX-1; j++) { + for (j = 0; j < EQI_MAX; j++) { if ((i = sd->equip_index[j]) < 0) continue; + if(j == EQI_AMMO) continue; if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == i) continue; if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == i) diff --git a/src/map/pc.c b/src/map/pc.c index c85469b858..e0688cf9a2 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1979,8 +1979,8 @@ int pc_delautobonus(struct map_session_data* sd, struct s_autobonus *autobonus,c if( autobonus[i].bonus_script ) { int j; - ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos ); - if( j < EQI_MAX-1 ) + ARR_FIND( 0, EQI_MAX, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus[i].pos ); + if( j < EQI_MAX ) script_run_autobonus(autobonus[i].bonus_script,sd->bl.id,sd->equip_index[j]); } continue; @@ -2010,8 +2010,8 @@ int pc_exeautobonus(struct map_session_data *sd,struct s_autobonus *autobonus) if( autobonus->other_script ) { int j; - ARR_FIND( 0, EQI_MAX-1, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos ); - if( j < EQI_MAX-1 ) + ARR_FIND( 0, EQI_MAX, j, sd->equip_index[j] >= 0 && sd->status.inventory[sd->equip_index[j]].equip == autobonus->pos ); + if( j < EQI_MAX ) script_run_autobonus(autobonus->other_script,sd->bl.id,sd->equip_index[j]); } diff --git a/src/map/status.c b/src/map/status.c index a1215455e4..809cbdf67c 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2587,10 +2587,11 @@ int status_calc_pc_(struct map_session_data* sd, bool first) pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),true); // Parse equipment - for(i=0;iequip_index[i]; // We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus] if(index < 0) continue; + if(i == EQI_AMMO) continue; if(i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index) continue; if(i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index) @@ -2737,10 +2738,11 @@ int status_calc_pc_(struct map_session_data* sd, bool first) status->def += (refinedef+50)/100; // Parse Cards - for(i=0;iequip_index[i]; // We pass INDEX to current_equip_item_index - for EQUIP_SCRIPT (new cards solution) [Lupus] if(index < 0) continue; + if(i == EQI_AMMO) continue; if(i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index) continue; if(i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index) From b7fd7468bb6426887268f44ff5e5e8d9f35ec13f Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Wed, 18 Dec 2013 18:40:19 +0700 Subject: [PATCH 18/21] Fixed query for '18766' on item_db_re.sql Signed-off-by: Cydh Ramdh --- sql-files/item_db_re.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 3cfb67316b..97b6567036 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -8573,7 +8573,7 @@ REPLACE INTO `item_db_re` VALUES (18756,'Black_Shiba_Inu_Hat','Black Shiba Inu H REPLACE INTO `item_db_re` VALUES (18758,'Hat_Of_Scrat','Hat Of Scrat',5,20,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,896,NULL,NULL,NULL); REPLACE INTO `item_db_re` VALUES (18759,'Stretched_Nose_M','Wood Goblin\'s Nose',5,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',0,737,'bonus bUnbreakableHelm,0;',NULL,NULL); # -REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',5,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,NULL,'bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1;',NULL,NULL); +REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',5,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,NULL,'bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine()>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1;',NULL,NULL); REPLACE INTO `item_db_re` VALUES (18767,'Improved_Helm_Of_Sun','Improved Hat of the Sun God',5,10,NULL,2400,NULL,4,NULL,1,0x7CCFDF80,63,2,768,NULL,'99',1,NULL,'bonus bStr,3; bonus bInt,2; bonus bAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bAtk,15;bonus bMatk,15;} if(getrefine()>=9){bonus bAtk,15;bonus bMatk,15;}',NULL,NULL); # REPLACE INTO `item_db_re` VALUES (18779,'RWC_Champ_Crown_First_Place','RWC Champ Crown First Place',5,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,902,'bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL); From 2330caaf0c26c03119f908e739f8b685e90323dc Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Thu, 19 Dec 2013 11:33:10 +0700 Subject: [PATCH 19/21] * Fixed bugreport http://rathena.org/board/tracker/issue-8360-error-report-0000-still-images/ Signed-off-by: Cydh Ramdh --- npc/pre-re/guides/guides_payon.txt | 4 ++-- npc/re/guides/guides_payon.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/npc/pre-re/guides/guides_payon.txt b/npc/pre-re/guides/guides_payon.txt index 65eb350b46..a3a0f5efdf 100644 --- a/npc/pre-re/guides/guides_payon.txt +++ b/npc/pre-re/guides/guides_payon.txt @@ -186,7 +186,7 @@ payon,162,67,4 script Guide#pay 708,{ break; } } - cutin "pay_soldier",255; + cutin "",255; end; } @@ -291,6 +291,6 @@ pay_arche,85,30,2 script Guide#2pay 708,{ break; } } - cutin "pay_soldier",255; + cutin "",255; end; } diff --git a/npc/re/guides/guides_payon.txt b/npc/re/guides/guides_payon.txt index 670da11105..ca0224f5bf 100644 --- a/npc/re/guides/guides_payon.txt +++ b/npc/re/guides/guides_payon.txt @@ -178,8 +178,8 @@ payon,163,64,3 script Guide#01payon::GuidePayon 708,{ case 4: mes "[Payon Guide]"; mes "Enjoy your stay."; - close; - cutin "pay_soldier",255; + close2; + cutin "",255; end; } } @@ -287,7 +287,7 @@ pay_arche,86,33,4 script Guide#05payon 708,{ mes "[Payon Guide]"; mes "Enjoy your stay."; close2; - cutin "pay_soldier",255; + cutin "",255; end; } } From 432cdb768645a576a3bbb4e9940b186ccfa5b4ad Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Thu, 19 Dec 2013 12:59:26 +0700 Subject: [PATCH 20/21] Implemented 'devotion_rdamage' on conf/battle/skill.conf for suggestion on http://rathena.org/board/topic/78620-renewal-devotion/ // Using 'old' behavior for devotion vs reflect damage? (Note 2) // Default is 0 (official). If 'devotion_rdamage' is > 0 (chance to devot the reflected damage), // when player with devotion attacks player with reflect damage ability (item bonus or skill), // the damage will be taken by the person who provides devotion instead the attacker. devotion_rdamage: 0 Signed-off-by: Cydh Ramdh --- conf/battle/skill.conf | 6 ++++++ src/map/battle.c | 33 ++++++++++++++++++++++++++------- src/map/battle.h | 1 + src/map/skill.c | 4 ++-- 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf index e941632bb3..0092876cfb 100644 --- a/conf/battle/skill.conf +++ b/conf/battle/skill.conf @@ -181,6 +181,12 @@ gx_disptype: 1 // Max Level Difference for Devotion devotion_level_difference: 10 +// Using 'old' behavior for devotion vs reflect damage? (Note 2) +// Default is 0 (official). If 'devotion_rdamage' is > 0 (chance to devot the reflected damage), +// when player with devotion attacks player with reflect damage ability (item bonus or skill), +// the damage will be taken by the person who provides devotion instead the attacker. +devotion_rdamage: 0 + // If no than you can use the ensemble skills alone. (Note 1) player_skill_partner_check: yes diff --git a/src/map/battle.c b/src/map/battle.c index 0f75cc932e..76f7fc1b37 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4477,11 +4477,20 @@ void battle_do_reflect(int attack_type, struct Damage *wd, struct block_list* sr // Item reflect gets calculated first rdamage = battle_calc_return_damage(target, src, &damage, wd->flag, skill_id, 0); if( rdamage > 0 ) { - //Use Reflect Shield to signal this kind of skill trigger. [Skotlex] - rdelay = clif_damage(src, src, tick, wd->amotion, sstatus->dmotion, rdamage, 1, 4, 0); + bool isDevotRdamage = false; + //Get info if the attacker has Devotion from other player + struct status_change *ssc = NULL; + struct block_list *d_bl = NULL; + if (battle_config.devotion_rdamage && battle_config.devotion_rdamage > rand()%100) { + ssc = status_get_sc(src);; + if (ssc && ssc->data[SC_DEVOTION] && (d_bl = map_id2bl(ssc->data[SC_DEVOTION]->val1))) + isDevotRdamage = true; + } + rdelay = clif_damage(src, (!isDevotRdamage) ? src : d_bl, tick, wd->amotion, sstatus->dmotion, rdamage, 1, 4, 0); if( tsd ) battle_drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src)); - battle_delay_damage(tick, wd->amotion,target,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true); - skill_additional_effect(target, src, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick); + //Use Reflect Shield to signal this kind of skill trigger. [Skotlex] + battle_delay_damage(tick, wd->amotion,target,(!isDevotRdamage) ? src : d_bl,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true); + skill_additional_effect(target, (!isDevotRdamage) ? src : d_bl, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick); } // Calculate skill reflect damage separately @@ -4489,6 +4498,15 @@ void battle_do_reflect(int attack_type, struct Damage *wd, struct block_list* sr struct status_data *tstatus = status_get_status_data(target); rdamage = battle_calc_return_damage(target, src, &damage, wd->flag, skill_id, 1); if( rdamage > 0 ) { + bool isDevotRdamage = false; + //Get info if the attacker has Devotion from other player + struct status_change *ssc = NULL; + struct block_list *d_bl = NULL; + if (battle_config.devotion_rdamage && battle_config.devotion_rdamage > rand()%100) { + ssc = status_get_sc(src);; + if (ssc && ssc->data[SC_DEVOTION] && (d_bl = map_id2bl(ssc->data[SC_DEVOTION]->val1))) + isDevotRdamage = true; + } //if(tsc->data[SC__SHADOWFORM]) { // struct block_list *s_bl = map_id2bl(tsc->data[SC__SHADOWFORM]->val2); // if(s_bl) @@ -4500,11 +4518,11 @@ void battle_do_reflect(int attack_type, struct Damage *wd, struct block_list* sr if(attack_type == BF_WEAPON && tsc->data[SC_REFLECTDAMAGE] ) // Don't reflect your own damage (Grand Cross) map_foreachinshootrange(battle_damage_area,target,skill_get_splash(LG_REFLECTDAMAGE,1),BL_CHAR,tick,target,wd->amotion,sstatus->dmotion,rdamage,tstatus->race); else if(attack_type == BF_WEAPON || attack_type == BF_MISC) { - rdelay = clif_damage(src, src, tick, wd->amotion, sstatus->dmotion, rdamage, 1, 4, 0); + rdelay = clif_damage(src, (!isDevotRdamage) ? src : d_bl, tick, wd->amotion, sstatus->dmotion, rdamage, 1, 4, 0); if( tsd ) battle_drain(tsd, src, rdamage, rdamage, sstatus->race, is_boss(src)); // It appears that official servers give skill reflect damage a longer delay - battle_delay_damage(tick, wd->amotion,target,src,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true); - skill_additional_effect(target, src, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick); + battle_delay_damage(tick, wd->amotion,target,(!isDevotRdamage) ? src : d_bl,0,CR_REFLECTSHIELD,0,rdamage,ATK_DEF,rdelay,true); + skill_additional_effect(target, (!isDevotRdamage) ? src : d_bl, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick); } } } @@ -7264,6 +7282,7 @@ static const struct _battle_data { { "emblem_transparency_limit", &battle_config.emblem_transparency_limit, 80, 0, 100, }, { "discount_item_point_shop", &battle_config.discount_item_point_shop, 0, 0, 3, }, { "update_enemy_position", &battle_config.update_enemy_position, 0, 0, 1, }, + { "devotion_rdamage", &battle_config.devotion_rdamage, 0, 0, 100, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index a51fbc13ab..04b7094839 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -514,6 +514,7 @@ extern struct Battle_Config int emblem_transparency_limit; int discount_item_point_shop; int update_enemy_position; + int devotion_rdamage; } battle_config; void do_init_battle(void); diff --git a/src/map/skill.c b/src/map/skill.c index 5cd364e50f..3279d23cb4 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2657,7 +2657,7 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list * //Reduction: 6% + 6% every 20% dmg.damage -= dmg.damage * (6 * (1+per)) / 100; } - } + } #endif } if(tsc && tsc->data[SC_MAGICROD] && src == dsrc) { @@ -5952,7 +5952,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui mer->devotion_flag = 1; // Mercenary Devoting Owner clif_skill_nodamage(src, bl, skill_id, skill_lv, - sc_start4(src,bl, type, 100, src->id, i, skill_get_range2(src,skill_id,skill_lv),0, skill_get_time2(skill_id, skill_lv))); + sc_start4(src, bl, type, 100, src->id, i, skill_get_range2(src,skill_id,skill_lv),0, skill_get_time2(skill_id, skill_lv))); clif_devotion(src, NULL); } break; From 854f8fc5025352b7663b3d975255257ac5532233 Mon Sep 17 00:00:00 2001 From: lighta Date: Thu, 19 Dec 2013 18:27:01 -0500 Subject: [PATCH 21/21] Quickfix Follow up hash:0f2dd7fcf, fixed a typo on packet lenght for storagelist this should fix bugreport:8344 Hotfix for bugreport:8333, (we're now checking if we fully add object on map before attempting to spawn it) --- src/map/chat.c | 15 +++++--- src/map/clif.c | 16 +++++---- src/map/elemental.c | 9 ++++- src/map/homunculus.c | 52 +++++++++++++++++++++++----- src/map/map.c | 40 +++++++++++++++------- src/map/mercenary.c | 9 ++++- src/map/mob.c | 35 +++++++++++++------ src/map/npc.c | 81 ++++++++++++++++++++++++++++++++++++-------- src/map/pet.c | 6 ++-- src/map/skill.c | 6 ++-- src/map/unit.c | 8 +++-- 11 files changed, 212 insertions(+), 65 deletions(-) diff --git a/src/map/chat.c b/src/map/chat.c index ced61ecfe5..05005301e7 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -167,7 +167,10 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass) /*========================================== - * leave a chatroom + * Make player *sd leave a chatroom + * @param *sd : player pointer + * @param kicked : for clif notification, kicked=1 or regular leave + * @return 0:sucess, 1:failed *------------------------------------------*/ int chat_leavechat(struct map_session_data* sd, bool kicked) { @@ -229,8 +232,8 @@ int chat_leavechat(struct map_session_data* sd, bool kicked) map_delblock( &cd->bl ); cd->bl.x=cd->usersd[0]->bl.x; cd->bl.y=cd->usersd[0]->bl.y; - map_addblock( &cd->bl ); - + if(map_addblock( &cd->bl )) + return 1; clif_dispchat(cd,0); } else @@ -241,6 +244,9 @@ int chat_leavechat(struct map_session_data* sd, bool kicked) /*========================================== * change a chatroom's owner + * @param *sd : player pointer + * @param *nextownername : string of new owner (name should be in chatroom) + * @return 0:sucess, 1:failure *------------------------------------------*/ int chat_changechatowner(struct map_session_data* sd, const char* nextownername) { @@ -274,7 +280,8 @@ int chat_changechatowner(struct map_session_data* sd, const char* nextownername) map_delblock( &cd->bl ); cd->bl.x = cd->owner->x; cd->bl.y = cd->owner->y; - map_addblock( &cd->bl ); + if(map_addblock( &cd->bl )) + return 1; // and display again clif_dispchat(cd,0); diff --git a/src/map/clif.c b/src/map/clif.c index 301c6846c1..5833a7f325 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2567,7 +2567,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items WBUFW(bufn,0)=0x995; memset((char*)WBUFP(buf,4),0,24); //storename #endif - WBUFW(bufn,2)=4+nn*s; + WBUFW(bufn,2)=sidx+nn*s; clif_send(bufn, WBUFW(bufn,2), &sd->bl, SELF); } for (i = 0; i < ne;) // Loop through equipable items @@ -2583,7 +2583,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items WBUFW(bufn,0)=0x996; memset((char*)WBUFP(bufn,4),0,24); //storename #endif - WBUFW(bufn,2)=4+nn*se; + WBUFW(bufn,2)=sidxe+nn*se; clif_send(bufn, WBUFW(bufn,2), &sd->bl, SELF); } @@ -9482,7 +9482,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) // reset the callshop flag if the player changes map sd->state.callshop = 0; - map_addblock(&sd->bl); + if(map_addblock(&sd->bl)) + return; clif_spawn(&sd->bl); // Party @@ -9524,7 +9525,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_displaymessage(sd->fd, msg_txt(sd,666)); pet_menu(sd, 3); //Option 3 is return to egg. } else { - map_addblock(&sd->pd->bl); + if(map_addblock(&sd->pd->bl)) + return; clif_spawn(&sd->pd->bl); clif_send_petdata(sd,sd->pd,0,0); clif_send_petstatus(sd); @@ -9534,7 +9536,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) //homunculus [blackhole89] if( merc_is_hom_active(sd->hd) ) { - map_addblock(&sd->hd->bl); + if(map_addblock(&sd->hd->bl)) + return; clif_spawn(&sd->hd->bl); clif_send_homdata(sd,SP_ACK,0); clif_hominfo(sd,sd->hd,1); @@ -9547,7 +9550,8 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) } if( sd->md ) { - map_addblock(&sd->md->bl); + if(map_addblock(&sd->md->bl)) + return; clif_spawn(&sd->md->bl); clif_mercenary_info(sd); clif_mercenary_skillblock(sd); diff --git a/src/map/elemental.c b/src/map/elemental.c index 33950d7892..52e46637b7 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -222,6 +222,12 @@ void elemental_summon_init(struct elemental_data *ed) { ed->regen.state.block = 0; } +/** + * Inter-serv has sent us the elemental data from sql, fill it in map-serv memory + * @param ele : The elemental data received from char-serv + * @param flag : 0:not created, 1:was saved/loaded + * @return 0:failed, 1:sucess + */ int elemental_data_received(struct s_elemental *ele, bool flag) { struct map_session_data *sd; struct elemental_data *ed; @@ -271,7 +277,8 @@ int elemental_data_received(struct s_elemental *ele, bool flag) { sd->status.ele_id = ele->elemental_id; if( ed->bl.prev == NULL && sd->bl.prev != NULL ) { - map_addblock(&ed->bl); + if(map_addblock(&ed->bl)) + return 0; clif_spawn(&ed->bl); clif_elemental_info(sd); clif_elemental_updatestatus(sd,SP_HP); diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 316000cc7b..5dcb200249 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -406,6 +406,11 @@ int merc_hom_change_class(struct homun_data *hd, short class_) return 1; } +/** + * Make an homonculus evolve, (changing in evolution class and apply bonus) + * @param hd : homonculus datas + * @return 0:failure, 1:success + */ int merc_hom_evolution(struct homun_data *hd) { struct s_homunculus *hom; @@ -442,7 +447,8 @@ int merc_hom_evolution(struct homun_data *hd) hom->intimacy = 500; unit_remove_map(&hd->bl, CLR_OUTSIGHT); - map_addblock(&hd->bl); + if(map_addblock(&hd->bl)) + return 0; clif_spawn(&hd->bl); clif_emotion(&sd->bl, E_NO1); @@ -459,6 +465,12 @@ int merc_hom_evolution(struct homun_data *hd) return 1 ; } +/** + * Make an homonculus mutate in renewal homon + * @param hd : homonculus datas + * @param homun_id : id to make it transform into (must be a valid homon class) + * @return 0:failure, 1:sucess + */ int hom_mutate(struct homun_data *hd, int homun_id) { struct s_homunculus *hom; @@ -486,7 +498,8 @@ int hom_mutate(struct homun_data *hd, int homun_id) } unit_remove_map(&hd->bl, CLR_OUTSIGHT); - map_addblock(&hd->bl); + if(map_addblock(&hd->bl)) + return 0; clif_spawn(&hd->bl); clif_emotion(&sd->bl, E_NO1); @@ -827,6 +840,11 @@ void merc_hom_init_timers(struct homun_data * hd) hd->masterteleport_timer = INVALID_TIMER; } +/** + * Make a player spawn a homonculus (call) + * @param sd + * @return 0:failure, 1:sucess + */ int merc_call_homunculus(struct map_session_data *sd) { struct homun_data *hd; @@ -853,7 +871,8 @@ int merc_call_homunculus(struct map_session_data *sd) hd->bl.x = sd->bl.x; hd->bl.y = sd->bl.y; hd->bl.m = sd->bl.m; - map_addblock(&hd->bl); + if(map_addblock(&hd->bl)) + return 0; clif_spawn(&hd->bl); clif_send_homdata(sd,SP_ACK,0); clif_hominfo(sd,hd,1); @@ -868,7 +887,13 @@ int merc_call_homunculus(struct map_session_data *sd) return 1; } -// Recv homunculus data from char server +/** + * Receive homunculus data from char server + * @param account_id : owner account_id of the homon + * @param sh : homonculus data from char-serv + * @param flag : does the creation in inter-serv was a success (0:no,1:yes) + * @return 0:failure, 1:sucess + */ int merc_hom_recv_data(int account_id, struct s_homunculus *sh, int flag) { struct map_session_data *sd; @@ -899,7 +924,8 @@ int merc_hom_recv_data(int account_id, struct s_homunculus *sh, int flag) hd = sd->hd; if(hd && hd->homunculus.hp && !hd->homunculus.vaporize && hd->bl.prev == NULL && sd->bl.prev != NULL) { - map_addblock(&hd->bl); + if(map_addblock(&hd->bl)) + return 0; clif_spawn(&hd->bl); clif_send_homdata(sd,SP_ACK,0); clif_hominfo(sd,hd,1); @@ -947,6 +973,14 @@ int merc_create_homunculus_request(struct map_session_data *sd, int class_) return 1; } +/** + * Make a player resurect an homon (player must have one) + * @param sd : player pointer + * @param per : hp percentage to revive homon + * @param x : x map coordinate + * @param y : Y map coordinate + * @return 0:failure, 1:success + */ int merc_resurrect_homunculus(struct map_session_data* sd, unsigned char per, short x, short y) { struct homun_data* hd; @@ -960,7 +994,7 @@ int merc_resurrect_homunculus(struct map_session_data* sd, unsigned char per, sh hd = sd->hd; - if (hd->homunculus.vaporize == HOM_ST_REST) + if (hd->homunculus.vaporize == HOM_ST_REST) return 0; // vaporized homunculi need to be 'called' if (!status_isdead(&hd->bl)) @@ -973,11 +1007,11 @@ int merc_resurrect_homunculus(struct map_session_data* sd, unsigned char per, sh hd->bl.m = sd->bl.m; hd->bl.x = x; hd->bl.y = y; - map_addblock(&hd->bl); + if(map_addblock(&hd->bl)) + return 0; clif_spawn(&hd->bl); } - status_revive(&hd->bl, per, 0); - return 1; + return status_revive(&hd->bl, per, 0); } void merc_hom_revive(struct homun_data *hd, unsigned int hp, unsigned int sp) diff --git a/src/map/map.c b/src/map/map.c index 2c8bf35d39..e25604ac13 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -328,7 +328,7 @@ int map_delblock(struct block_list* bl) int pos; nullpo_ret(bl); - // blocklist (2ways chainlist) + // blocklist (2ways chainlist) if (bl->prev == NULL) { if (bl->next != NULL) { // can't delete block (already at the begining of the chain) @@ -361,11 +361,16 @@ int map_delblock(struct block_list* bl) return 0; } -/*========================================== +/** * Moves a block a x/y target position. [Skotlex] * Pass flag as 1 to prevent doing skill_unit_move checks * (which are executed by default on BL_CHAR types) - *------------------------------------------*/ + * @param bl : block(object) to move + * @param x1 : new x position + * @param y1 : new y position + * @param tick : when this was scheduled + * @return 0:sucess, 1:fail + */ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) { int x0 = bl->x, y0 = bl->y; @@ -404,7 +409,10 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) #endif bl->x = x1; bl->y = y1; - if (moveblock) map_addblock(bl); + if (moveblock) { + if(map_addblock(bl)) + return 1; + } #ifdef CELL_NOSTACK else map_addblcell(bl); #endif @@ -677,7 +685,7 @@ int map_foreachinarea(int (*func)(struct block_list*,va_list), int16 m, int16 x0 int blockcount = bl_list_count, i; va_list ap; - if ( m < 0 ) + if ( m < 0 || m >= map_num) return 0; if ( x1 < x0 ) @@ -1417,13 +1425,18 @@ int map_search_freecell(struct block_list *src, int16 m, int16 *x,int16 *y, int1 } /*========================================== - * Add an item to location (m,x,y) - * Parameters - * @item_data item attributes - * @amount quantity - * @m, @x, @y mapid,x,y - * @first_charid, @second_charid, @third_charid, looting priority - * @flag: &1 MVP item. &2 do stacking check. &4 bypass droppable check. + * Add an item in floor to location (m,x,y) and add restriction for those who could pickup later + * NB : If charids are null their no restriction for pickup + * @param item_data : item attributes + * @param amount : items quantity + * @param m : mapid + * @param x : x coordinates + * @param y : y coordinates + * @param first_charid : 1st player that could loot the item (only charid that could loot for first_get_tick duration) + * @param second_charid : 2nd player that could loot the item (2nd charid that could loot for second_get_charid duration) + * @param third_charid : 3rd player that could loot the item (3rd charid that could loot for third_get_charid duration) + * @param flag: &1 MVP item. &2 do stacking check. &4 bypass droppable check. + * @return 0:failure, x:item_gid [MIN_FLOORITEM;MAX_FLOORITEM]==[2;START_ACCOUNT_NUM] *------------------------------------------*/ int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,int first_charid,int second_charid,int third_charid,int flags) { @@ -1465,7 +1478,8 @@ int map_addflooritem(struct item *item_data,int amount,int16 m,int16 x,int16 y,i fitem->cleartimer=add_timer(gettick()+battle_config.flooritem_lifetime,map_clearflooritem_timer,fitem->bl.id,0); map_addiddb(&fitem->bl); - map_addblock(&fitem->bl); + if(map_addblock(&fitem->bl)) + return 0; clif_dropflooritem(fitem); return fitem->bl.id; diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 4fa06d6ea4..7086489af5 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -280,6 +280,12 @@ void merc_contract_init(struct mercenary_data *md) md->regen.state.block = 0; } +/** + * Received mercenary data from char-serv + * @param merc : mercenary datas + * @param flag : if inter-serv request was sucessfull + * @return 0:failure, 1:sucess + */ int merc_data_received(struct s_mercenary *merc, bool flag) { struct map_session_data *sd; @@ -336,7 +342,8 @@ int merc_data_received(struct s_mercenary *merc, bool flag) if( md && md->bl.prev == NULL && sd->bl.prev != NULL ) { - map_addblock(&md->bl); + if(map_addblock(&md->bl)) + return 0; clif_spawn(&md->bl); clif_mercenary_info(sd); clif_mercenary_skillblock(sd); diff --git a/src/map/mob.c b/src/map/mob.c index aaebb2d378..711855a931 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -122,9 +122,13 @@ static int mobdb_searchname_array_sub(struct mob_db* mob, const char *str) return strcmpi(mob->jname,str); } -/*========================================== - * MvP Tomb [GreenBox] - *------------------------------------------*/ +/** + * Create and display a tombstone on the map + * @author [GreenBox] + * @param md : the mob to create a tombstone for + * @param killer : name of who has killed the mob + * @param time : time at wich the killed happen + */ void mvptomb_create(struct mob_data *md, char *killer, time_t time) { struct npc_data *nd; @@ -157,7 +161,8 @@ void mvptomb_create(struct mob_data *md, char *killer, time_t time) nd->u.tomb.killer_name[0] = '\0'; map_addnpc(nd->bl.m, nd); - map_addblock(&nd->bl); + if(map_addblock(&nd->bl)) + return; status_set_viewdata(&nd->bl, nd->class_); status_change_init(&nd->bl); unit_dataset(&nd->bl); @@ -894,9 +899,11 @@ int mob_count_sub(struct block_list *bl, va_list ap) { return 1; //backward compatibility } -/*========================================== - * Mob spawning. Initialization is also variously here. - *------------------------------------------*/ +/** + * Mob spawning. Initialization is also variously here. (Spawn a mob in a map) + * @param md : mob data to spawn + * @return 0:spawned, 1:delayed, 2:error + */ int mob_spawn (struct mob_data *md) { int i=0; @@ -981,7 +988,8 @@ int mob_spawn (struct mob_data *md) if ( md->tomb_nid ) mvptomb_destroy(md); - map_addblock(&md->bl); + if(map_addblock(&md->bl)) + return 2; if( map[md->bl.m].users ) clif_spawn(&md->bl); skill_unit_move(&md->bl,tick,1); @@ -2656,6 +2664,11 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) return 3; //Remove from map. } +/** + * Resurect a mob with x hp (reset value and respawn on map) + * @param md : mob pointer + * @param hp : hp to resurect him with, @FIXME unused atm + */ void mob_revive(struct mob_data *md, unsigned int hp) { unsigned int tick = gettick(); @@ -2666,8 +2679,10 @@ void mob_revive(struct mob_data *md, unsigned int hp) md->last_pcneartime = 0; memset(md->dmglog, 0, sizeof(md->dmglog)); // Reset the damage done on the rebirthed monster, otherwise will grant full exp + damage done. [Valaris] md->tdmg = 0; - if (!md->bl.prev) - map_addblock(&md->bl); + if (!md->bl.prev){ + if(map_addblock(&md->bl)) + return; + } clif_spawn(&md->bl); skill_unit_move(&md->bl,tick,1); mobskill_use(md, tick, MSC_SPAWN); diff --git a/src/map/npc.c b/src/map/npc.c index 83131b3042..cb17f846df 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2158,7 +2158,19 @@ static void npc_parsename(struct npc_data* nd, const char* name, const char* sta } } -//Add then display an npc warp on map +/** + * Add then display an npc warp on map + * @param name : warp unique name + * @param from_mapid : mapid to warp from + * @param from_x : x coordinate of warp + * @param from_y : y coordinate of warp + * @param xs : x lenght of warp (for trigger activation) + * @param ys : y lenght of warp (for trigger activation) + * @param to_mapindex : mapid to warp to + * @param to_x : x coordinate to warp to + * @param to_y : y coordinate to warp to + * @return NULL:failed creation, npc_data* new warp + */ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y) { int i, flag = 0; @@ -2197,7 +2209,8 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short nd->bl.type = BL_NPC; nd->subtype = WARP; npc_setcells(nd); - map_addblock(&nd->bl); + if(map_addblock(&nd->bl)) + return NULL; status_set_viewdata(&nd->bl, nd->class_); status_change_init(&nd->bl); unit_dataset(&nd->bl); @@ -2208,7 +2221,18 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short return nd; } -/// Parses a warp npc. +/** + * Parses a warp npc. + * Line definition ,,,%TAB%warp%TAB%%TAB%,,,, + * @param w1 : word 1 before tab (,,,) + * @param w2 : word 2 before tab (warp), keyword that sent us in this parsing + * @param w3 : word 3 before tab () + * @param w4 : word 4 before tab (,,,,) + * @param start : index to start parsing + * @param buffer : lines to parses + * @param filepath : filename with path wich we are parsing + * @return new index for next parsing + */ static const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) { int x, y, xs, ys, to_x, to_y, m; @@ -2262,7 +2286,8 @@ static const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const nd->bl.type = BL_NPC; nd->subtype = WARP; npc_setcells(nd); - map_addblock(&nd->bl); + if(map_addblock(&nd->bl)) //couldn't add on map + return strchr(start,'\n'); status_set_viewdata(&nd->bl, nd->class_); status_change_init(&nd->bl); unit_dataset(&nd->bl); @@ -2273,7 +2298,22 @@ static const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const return strchr(start,'\n');// continue } -/// Parses a shop/cashshop npc. +/** + * Parses a shop/cashshop npc. + * Line definition : + * ,,,%TAB%shop%TAB%%TAB%,:{,:...} + * ,,,%TAB%itemshop%TAB%%TAB%,{:},:{,:...} + * ,,,%TAB%pointshop%TAB%%TAB%,{:},:{,:...} + * @TODO missing cashshop line definition + * @param w1 : word 1 before tab (,,,) + * @param w2 : word 2 before tab (shop|cashshop|itemshop|pointshop), keyword that sent us in this parsing + * @param w3 : word 3 before tab () + * @param w4 : word 4 before tab (,) + * @param start : index to start parsing + * @param buffer : lines to parses + * @param filepath : filename with path wich we are parsing + * @return new index for next parsing + */ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) { //TODO: could be rewritten to NOT need this temp array [ultramage] @@ -2419,7 +2459,8 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const if( m >= 0 ) {// normal shop npc map_addnpc(m,nd); - map_addblock(&nd->bl); + if(map_addblock(&nd->bl)) + return strchr(start,'\n'); status_set_viewdata(&nd->bl, nd->class_); status_change_init(&nd->bl); unit_dataset(&nd->bl); @@ -2555,11 +2596,20 @@ static const char* npc_skip_script(const char* start, const char* buffer, const return p+1;// return after the last '}' } -/// Parses a npc script. -/// -/// -%TAB%script%TAB%%TAB%-1,{} -/// ,,,%TAB%script%TAB%%TAB%,{} -/// ,,,%TAB%script%TAB%%TAB%,,,{} +/** + * Parses a npc script. + * Line definition : + * ,,,%TAB%script%TAB%%TAB%,{} + * ,,,%TAB%script%TAB%%TAB%,,,{} * @TODO missing cashshop line definition + * @param w1 : word 1 before tab (,,,) + * @param w2 : word 2 before tab (script), keyword that sent us in this parsing + * @param w3 : word 3 before tab () + * @param w4 : word 4 before tab (,) + * @param start : index to start parsing + * @param buffer : lines to parses + * @param filepath : filename with path wich we are parsing + * @return new index for next parsing + */ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, bool runOnInit) { int x, y, dir = 0, m, xs = 0, ys = 0, class_ = 0; // [Valaris] thanks to fov char mapname[32]; @@ -2648,7 +2698,8 @@ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, cons unit_dataset(&nd->bl); nd->ud.dir = dir; npc_setcells(nd); - map_addblock(&nd->bl); + if(map_addblock(&nd->bl)) + return NULL; if( class_ >= 0 ) { status_set_viewdata(&nd->bl, nd->class_); @@ -2808,7 +2859,8 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch unit_dataset(&nd->bl); nd->ud.dir = dir; npc_setcells(nd); - map_addblock(&nd->bl); + if(map_addblock(&nd->bl)) + return end; if( class_ >= 0 ) { status_set_viewdata(&nd->bl, nd->class_); if( map[nd->bl.m].users ) @@ -2892,7 +2944,8 @@ int npc_duplicate4instance(struct npc_data *snd, int16 m) { wnd->bl.type = BL_NPC; wnd->subtype = WARP; npc_setcells(wnd); - map_addblock(&wnd->bl); + if(map_addblock(&wnd->bl)) + return 1; status_set_viewdata(&wnd->bl, wnd->class_); status_change_init(&wnd->bl); unit_dataset(&wnd->bl); diff --git a/src/map/pet.c b/src/map/pet.c index 9ad0daad2e..1ea052cb8a 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -411,7 +411,8 @@ int pet_birth_process(struct map_session_data *sd, struct s_pet *pet) chrif_save(sd,0); //is it REALLY Needed to save the char for hatching a pet? [Skotlex] if(sd->bl.prev != NULL) { - map_addblock(&sd->pd->bl); + if(map_addblock(&sd->pd->bl)) + return 1; clif_spawn(&sd->pd->bl); clif_send_petdata(sd,sd->pd, 0,0); clif_send_petdata(sd,sd->pd, 5,battle_config.pet_hair_style); @@ -452,7 +453,8 @@ int pet_recv_petdata(int account_id,struct s_pet *p,int flag) } else { pet_data_init(sd,p); if(sd->pd && sd->bl.prev != NULL) { - map_addblock(&sd->pd->bl); + if(map_addblock(&sd->pd->bl)) + return 1; clif_spawn(&sd->pd->bl); clif_send_petdata(sd,sd->pd,0,0); clif_send_petdata(sd,sd->pd,5,battle_config.pet_hair_style); diff --git a/src/map/skill.c b/src/map/skill.c index 3279d23cb4..5ea6dd9105 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6124,7 +6124,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui skill_get_splash(skill_id, skill_lv), splash_target(src), src, skill_id, skill_lv, tick, flag|i, skill_castend_damage_id); - map_addblock(src); + if(map_addblock(src)) + return 1; status_damage(src, src, sstatus->max_hp,0,0,1); break; @@ -15985,7 +15986,8 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int idb_put(skillunit_db, unit->bl.id, unit); map_addiddb(&unit->bl); - map_addblock(&unit->bl); + if(map_addblock(&unit->bl)) + return NULL; // perform oninit actions switch (group->skill_id) { diff --git a/src/map/unit.c b/src/map/unit.c index e4cfcd363d..47e225613b 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -199,7 +199,8 @@ int unit_check_start_teleport_timer(struct block_list *sbl) case BL_PET : max_dist = AREA_SIZE; break; case BL_MER : max_dist = MAX_MER_DISTANCE; break; } - if(msd && max_dist){ // If there is a master and it's a valid type + // If there is a master and it's a valid type + if(msd && (msd->bl.type&BL_PC) && max_dist){ ///TODO the bl.type is an hotfix please dig it to remove it int *msd_tid = unit_get_masterteleport_timer(sbl); if(msd_tid == NULL) return 0; if (!check_distance_bl(&msd->bl, sbl, max_dist)) { @@ -941,7 +942,7 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag) * @param x: Destination cell X * @param y: Destination cell Y * @param type: Clear type used in clif_clearunit_area() -* @return Success(0); Failed(1); Error(2); unit_remove_map() Failed(3) +* @return Success(0); Failed(1); Error(2); unit_remove_map() Failed(3); map_addblock Failed(4) **/ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type) { @@ -1001,7 +1002,8 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type) bl->y=ud->to_y=y; bl->m=m; - map_addblock(bl); + if(map_addblock(bl)) + return 4; //error on adding bl to map clif_spawn(bl); skill_unit_move(bl,gettick(),1);