summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/pre-re/item_db.conf4
-rw-r--r--db/re/item_db.conf4
-rw-r--r--sql-files/item_db.sql2
-rw-r--r--sql-files/item_db_re.sql24
-rw-r--r--sql-files/upgrades/2013-11-18--08-23.sql65
-rw-r--r--sql-files/upgrades/index.txt3
-rw-r--r--src/char/char.c26
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/chrif.c20
-rw-r--r--src/map/chrif.h2
-rw-r--r--src/map/clif.c17
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/itemdb.c161
-rw-r--r--src/map/itemdb.h4
-rw-r--r--src/map/packets.h2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc28
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc7
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc81
-rw-r--r--src/plugins/db2sql.c6
19 files changed, 318 insertions, 145 deletions
diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf
index 569f084c8..af919f037 100644
--- a/db/pre-re/item_db.conf
+++ b/db/pre-re/item_db.conf
@@ -64005,8 +64005,8 @@ item_db: (
bonus2 bAddEle,Ele_Neutral,10;
bonus3 bAutoSpell,MG_COLDBOLT,3,50;
bonus4 bAutoSpellOnSkill,MG_COLDBOLT,MG_FIREBOLT,3,1000;
- bonus4 bAutoSpellOnSkill,MG_FIREBOLT,MG_LIGHTNINGBOLT,3,10000;
- bonus4 bAutoSpellOnSkill,MG_LIGHTNINGBOLT,WZ_EARTHSPIKE,3,10000;
+ bonus4 bAutoSpellOnSkill,MG_FIREBOLT,MG_LIGHTNINGBOLT,3,1000;
+ bonus4 bAutoSpellOnSkill,MG_LIGHTNINGBOLT,WZ_EARTHSPIKE,3,1000;
">
},
{
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index c70588a13..727fb72a0 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -78390,8 +78390,8 @@ item_db: (
bonus2 bAddEle,Ele_Neutral,10;
bonus3 bAutoSpell,MG_COLDBOLT,3,50;
bonus4 bAutoSpellOnSkill,MG_COLDBOLT,MG_FIREBOLT,3,1000;
- bonus4 bAutoSpellOnSkill,MG_FIREBOLT,MG_LIGHTNINGBOLT,3,10000;
- bonus4 bAutoSpellOnSkill,MG_LIGHTNINGBOLT,WZ_EARTHSPIKE,3,10000;
+ bonus4 bAutoSpellOnSkill,MG_FIREBOLT,MG_LIGHTNINGBOLT,3,1000;
+ bonus4 bAutoSpellOnSkill,MG_LIGHTNINGBOLT,WZ_EARTHSPIKE,3,1000;
">
},
{
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index f3d46f06d..923ca5ede 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -5209,7 +5209,7 @@ REPLACE INTO `item_db` VALUES ('13410','BF_Sword1','Valorous Gladiator Blade','4
REPLACE INTO `item_db` VALUES ('13411','BF_Sword2','Brave Gladiator Blade','4','20','10','0','115','0','0','1','0','414947','63','2','2','3','80','150','1','2','0','bonus bStr,1; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bMatkRate,10; bonus bUnbreakableWeapon,0;','','');
REPLACE INTO `item_db` VALUES ('13412','Twin_Edge_B','Twin Edge of Naght Sieger','4','20','10','1500','150','0','0','1','3','414946','2','2','2','4','75','150','1','2','0','bonus bAtkEle,Ele_Water; skill MG_FROSTDIVER,5; autobonus \"{ bonus bIgnoreDefRace,RC_NonBoss; }\",50,5000;','','');
REPLACE INTO `item_db` VALUES ('13413','Twin_Edge_R','Twin Edge of Naght Sieger','4','20','10','1500','160','0','0','1','3','414946','2','2','2','4','75','150','1','2','0','bonus bAtkEle,Ele_Fire; skill WZ_METEOR,3; autobonus \"{ bonus bIgnoreDefRace,RC_NonBoss; }\",50,5000;','','');
-REPLACE INTO `item_db` VALUES ('13414','Elemental_Sword','Elemental Sword','4','20','10','1200','105','0','0','1','3','414946','2','2','2','3','70','150','1','2','0','bonus bStr,2; bonus bInt,4; bonus bDex,1; bonus bMatkRate,5; bonus2 bAddEle,Ele_Neutral,10; bonus3 bAutoSpell,MG_COLDBOLT,3,50; bonus4 bAutoSpellOnSkill,MG_COLDBOLT,MG_FIREBOLT,3,1000; bonus4 bAutoSpellOnSkill,MG_FIREBOLT,MG_LIGHTNINGBOLT,3,10000; bonus4 bAutoSpellOnSkill,MG_LIGHTNINGBOLT,WZ_EARTHSPIKE,3,10000;','','');
+REPLACE INTO `item_db` VALUES ('13414','Elemental_Sword','Elemental Sword','4','20','10','1200','105','0','0','1','3','414946','2','2','2','3','70','150','1','2','0','bonus bStr,2; bonus bInt,4; bonus bDex,1; bonus bMatkRate,5; bonus2 bAddEle,Ele_Neutral,10; bonus3 bAutoSpell,MG_COLDBOLT,3,50; bonus4 bAutoSpellOnSkill,MG_COLDBOLT,MG_FIREBOLT,3,1000; bonus4 bAutoSpellOnSkill,MG_FIREBOLT,MG_LIGHTNINGBOLT,3,1000; bonus4 bAutoSpellOnSkill,MG_LIGHTNINGBOLT,WZ_EARTHSPIKE,3,1000;','','');
REPLACE INTO `item_db` VALUES ('13415','N_Falchion','Novice Falchion','4','0','0','0','59','0','0','1','3','414947','63','2','2','1','2','150','0','2','0','','','');
REPLACE INTO `item_db` VALUES ('13416','Krieger_Onehand_Sword1','Glorious Flamberge','4','20','10','0','130','0','0','1','0','414947','63','2','2','4','80','150','1','2','0','bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine()>5) { bonus2 bAddRace,RC_DemiHuman,(getrefine()-4)*(getrefine()-4); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>6) bonus bAspdRate,5; if(getrefine()>8) { bonus bAspdRate,5; bonus4 bAutoSpellOnSkill,SM_BASH,NPC_CRITICALWOUND,2,200; }','','');
REPLACE INTO `item_db` VALUES ('13417','Krieger_Onehand_Sword2','Glorious Rapier','4','20','10','0','130','0','0','1','0','414947','63','2','2','4','80','150','1','2','0','bonus bInt,getrefine()-5; bonus bMatkRate,10; bonus bUnbreakableWeapon,0; if(getrefine()>5) bonus bUseSPrate,-10; if(getrefine()>8) bonus bInt,5;','','');
diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql
index 08a2f8291..3f3532b74 100644
--- a/sql-files/item_db_re.sql
+++ b/sql-files/item_db_re.sql
@@ -1838,12 +1838,12 @@ REPLACE INTO `item_db_re` VALUES ('2815','Th_Ring_Of_Water','Ring of Water','5',
REPLACE INTO `item_db_re` VALUES ('2816','Radar_Ring1','Radar Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0','150','0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2817','Radar_Ring2','Radar Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0','150','0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2818','Radar_Ring3','Radar Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0','150','0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2819','Swordman_Manual','Swordman Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','1','0','0','0','bonus bMaxSP,100; skill SM_BASH,1; skill SM_PROVOKE,1; skill SM_MAGNUM,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2820','Thief_Manual','Thief Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','1','0','0','0','bonus bMaxSP,100; skill TF_DOUBLE,3; bonus bDoubleRate,15; skill TF_STEAL,1; skill TF_HIDING,1; skill TF_POISON,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2821','Acolyte_Manual','Acolyte Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','1','0','0','0','bonus bMaxSP,100; skill AL_HEAL,1; skill AL_INCAGI,1; skill AL_BLESSING,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2822','Archer_Manual','Archer Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','1','0','0','0','bonus bMaxSP,100; skill AC_OWL,1; skill AC_CONCENTRATION,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2823','Merchant_Manual','Merchant Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','1','0','0','0','bonus bMaxSP,100; skill MC_DISCOUNT,1; skill MC_OVERCHARGE,10; skill MC_IDENTIFY,1; skill MC_MAMMONITE,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2824','Mage_Manual','Mage Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','1','0','0','0','bonus bMaxSP,100; skill MG_SRECOVERY,1; skill MG_COLDBOLT,1; skill MG_FIREWALL,1; skill MG_FIREBOLT,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2819','Swordman_Manual','Swordman Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','12','0','0','0','bonus bMaxSP,100; skill SM_BASH,1; skill SM_PROVOKE,1; skill SM_MAGNUM,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2820','Thief_Manual','Thief Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','12','0','0','0','bonus bMaxSP,100; skill TF_DOUBLE,3; bonus bDoubleRate,15; skill TF_STEAL,1; skill TF_HIDING,1; skill TF_POISON,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2821','Acolyte_Manual','Acolyte Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','12','0','0','0','bonus bMaxSP,100; skill AL_HEAL,1; skill AL_INCAGI,1; skill AL_BLESSING,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2822','Archer_Manual','Archer Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','12','0','0','0','bonus bMaxSP,100; skill AC_OWL,1; skill AC_CONCENTRATION,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2823','Merchant_Manual','Merchant Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','12','0','0','0','bonus bMaxSP,100; skill MC_DISCOUNT,1; skill MC_OVERCHARGE,10; skill MC_IDENTIFY,1; skill MC_MAMMONITE,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2824','Mage_Manual','Mage Manual','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','12','0','0','0','bonus bMaxSP,100; skill MG_SRECOVERY,1; skill MG_COLDBOLT,1; skill MG_FIREWALL,1; skill MG_FIREBOLT,1;','','');
REPLACE INTO `item_db_re` VALUES ('2825','Shaman_EaringB','Shaman Earrings','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0','150','0','0','0','bonus bInt,2;','','');
REPLACE INTO `item_db_re` VALUES ('2826','Dark_Knight_BeltB','Dark Knight Belt','5','20','10','500','0','0','1','0','0','4294967295','63','2','136','0','0','150','0','0','0','bonus bDex,2; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2827','Dark_Knight_GloveB','Dark Knight Glove','5','20','10','500','0','0','1','0','0','4294967295','63','2','136','0','0','150','0','0','0','autobonus \"{ bonus bMaxHPrate,10; }\",10,10000,0,\"{ specialeffect2 EF_POTION_BERSERK; }\";','','');
@@ -1904,7 +1904,7 @@ REPLACE INTO `item_db_re` VALUES ('2881','Orleans_Necklace','Orlean\'s Necklace'
REPLACE INTO `item_db_re` VALUES ('2882','Ecoro_Cardslip','Card Sleeves ECO ?RO','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0','150','0','0','0','bonus bVit,1; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2883','Ur_Seal','Ur\'s Seal','5','20','10','200','0','0','4','0','1','16512','56','2','136','0','100','150','0','0','0','bonus bMaxHPrate,2; bonus2 bSkillUseSP,LK_SPIRALPIERCE,5; bonus2 bSkillUseSP,RK_HUNDREDSPEAR,5;','','');
REPLACE INTO `item_db_re` VALUES ('2884','Peuz_Seal','Peuz\'s Seal','5','20','10','200','0','0','3','0','1','16512','56','2','136','0','100','150','0','0','0','bonus bBaseAtk,20; bonus bMaxSP,20;','','');
-REPLACE INTO `item_db_re` VALUES ('2885','Mother_Heart','Mother\'s Heart','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','1','1','0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2885','Mother_Heart','Mother\'s Heart','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','1','60','0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2886','Sabah_Ring','Sapha Ring','5','20','10','100','0','0','0','0','0','4096','56','2','136','0','100','150','0','0','0','bonus bCritical,3;','','');
REPLACE INTO `item_db_re` VALUES ('2887','Nab_Ring','Nab Ring','5','20','10','100','0','0','0','0','0','4096','56','2','136','0','100','150','0','0','0','bonus bBaseAtk,10; bonus bMatk,20;','','');
REPLACE INTO `item_db_re` VALUES ('2888','School_Bag','Attending School Back','5','20','10','1000','0','0','0','0','1','4294967295','63','2','136','0','0','150','0','0','0','','','');
@@ -1949,9 +1949,9 @@ REPLACE INTO `item_db_re` VALUES ('2926','Vit_Glove_','Vit Glove','5','75000','3
REPLACE INTO `item_db_re` VALUES ('2927','Dex_Glove_','Dex Glove','5','75000','37500','100','0','0','0','0','1','4294967295','63','2','136','0','100','150','0','0','0','bonus bMaxHP,100; bonus bMaxSP,20; bonus bHit,(readparam(bDex)/10); if(readparam(bDex)>=110) bonus bLongAtkRate,1;','','');
REPLACE INTO `item_db_re` VALUES ('2928','Luk_Glove_','Luk Glove','5','75000','37500','100','0','0','0','0','1','4294967295','63','2','136','0','100','150','0','0','0','bonus bMaxHP,100; bonus bMaxSP,20; bonus bCritical,(readparam(bLuk)/10); if(readparam(bLuk)>=110) bonus bCritAtkRate,1;','','');
REPLACE INTO `item_db_re` VALUES ('2936','Recovery_Ring','Rings of Recovery','5','20','10','100','0','0','5','0','1','4294967295','63','2','136','0','10','150','0','0','0','bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2940','Ninja_Manual','Ninja Tutorial','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','1','0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2941','Gunslinger_Manual','Gunslinger Tutorial','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','1','0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2942','Taekwon_Manual','Taekwon Tutorial','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','1','0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2940','Ninja_Manual','Ninja Tutorial','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','12','0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2941','Gunslinger_Manual','Gunslinger Tutorial','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','12','0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2942','Taekwon_Manual','Taekwon Tutorial','5','0','0','100','0','0','0','0','0','1','47','2','136','0','1','12','0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2959','Fidelity_Necklace','Fidelity Necklace','5','20','10','300','0','0','0','0','1','4294967295','63','2','136','0','50','150','0','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2960','Badge_Of_Manny','Badge Of Manny','5','20','10','200','0','0','0','0','1','4294967295','63','2','136','0','0','150','0','0','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db_re` VALUES ('2966','RWC_2012_Ring','RWC 2012 Ring','5','20','10','200','0','0','0','0','0','4294967295','63','2','136','0','0','150','0','0','0','','','');
@@ -5233,7 +5233,7 @@ REPLACE INTO `item_db_re` VALUES ('11514','Enriched_Slim_Pot','Enriched Slim Pot
REPLACE INTO `item_db_re` VALUES ('11515','Coconut','Coconut','0','1500','750','120','0','0','0','0','0','4294967295','63','2','0','0','0','150','0','0','0','itemheal rand(300,400),0;','','');
REPLACE INTO `item_db_re` VALUES ('11516','Asai_Fruit','Asai Fruit','0','15','7','20','0','0','0','0','0','4294967295','63','2','0','0','0','150','0','0','0','itemheal rand(16,22),0;','','');
REPLACE INTO `item_db_re` VALUES ('11517','Puri_Potion','Purification Potion','0','20','10','100','0','0','0','0','0','4294967295','63','2','0','0','0','150','0','0','0','itemheal rand(400,600),0;','','');
-REPLACE INTO `item_db_re` VALUES ('11518','N_Blue_Potion','Cure Free','0','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','1','1','0','0','0','itemheal 0,5;','','');
+REPLACE INTO `item_db_re` VALUES ('11518','N_Blue_Potion','Cure Free','0','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','1','20','0','0','0','itemheal 0,5;','','');
REPLACE INTO `item_db_re` VALUES ('11519','Beef_Toast','Bifrost','0','1200','600','40','0','0','0','0','0','4294967295','63','2','0','0','0','150','0','0','0','itemheal rand(170,250),0;','','');
REPLACE INTO `item_db_re` VALUES ('11520','Mora_Mandarin','Mora Mandarin','0','500','250','20','0','0','0','0','0','4294967295','63','2','0','0','100','150','0','0','0','itemheal 0,rand(50,80);','','');
REPLACE INTO `item_db_re` VALUES ('11521','Pingui_Berry_Juice','Pinguicula Berry Juice','0','500','250','50','0','0','0','0','0','4294967295','63','2','0','0','100','150','0','0','0','itemheal rand(400,800),rand(50,80);','','');
@@ -6374,7 +6374,7 @@ REPLACE INTO `item_db_re` VALUES ('13410','BF_Sword1','Valorous Gladiator Blade'
REPLACE INTO `item_db_re` VALUES ('13411','BF_Sword2','Brave Gladiator Blade','4','20','10','0','115','74','0','1','0','414947','63','2','2','3','80','150','1','2','0','bonus bStr,1; bonus bDex,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bMatkRate,10; bonus bUnbreakableWeapon,0;','','');
REPLACE INTO `item_db_re` VALUES ('13412','Twin_Edge_B','Twin Edge of Naght Sieger','4','20','10','1500','150','0','0','1','3','414946','58','2','2','4','75','150','1','2','0','bonus bAtkEle,Ele_Water; skill MG_FROSTDIVER,5; autobonus \"{ bonus bIgnoreDefRace,RC_NonBoss; }\",50,5000;','','');
REPLACE INTO `item_db_re` VALUES ('13413','Twin_Edge_R','Twin Edge of Naght Sieger','4','20','10','1500','160','0','0','1','3','414946','58','2','2','4','75','150','1','2','0','bonus bAtkEle,Ele_Fire; skill WZ_METEOR,3; autobonus \"{ bonus bIgnoreDefRace,RC_NonBoss; }\",50,5000;','','');
-REPLACE INTO `item_db_re` VALUES ('13414','Elemental_Sword','Elemental Sword','4','20','10','1200','105','95','0','1','3','414946','58','2','2','3','70','150','1','2','0','bonus bStr,2; bonus bInt,4; bonus bDex,1; bonus2 bAddEle,Ele_Neutral,10; bonus3 bAutoSpell,MG_COLDBOLT,3,50; bonus4 bAutoSpellOnSkill,MG_COLDBOLT,MG_FIREBOLT,3,1000; bonus4 bAutoSpellOnSkill,MG_FIREBOLT,MG_LIGHTNINGBOLT,3,10000; bonus4 bAutoSpellOnSkill,MG_LIGHTNINGBOLT,WZ_EARTHSPIKE,3,10000;','','');
+REPLACE INTO `item_db_re` VALUES ('13414','Elemental_Sword','Elemental Sword','4','20','10','1200','105','95','0','1','3','414946','58','2','2','3','70','150','1','2','0','bonus bStr,2; bonus bInt,4; bonus bDex,1; bonus2 bAddEle,Ele_Neutral,10; bonus3 bAutoSpell,MG_COLDBOLT,3,50; bonus4 bAutoSpellOnSkill,MG_COLDBOLT,MG_FIREBOLT,3,1000; bonus4 bAutoSpellOnSkill,MG_FIREBOLT,MG_LIGHTNINGBOLT,3,1000; bonus4 bAutoSpellOnSkill,MG_LIGHTNINGBOLT,WZ_EARTHSPIKE,3,1000;','','');
REPLACE INTO `item_db_re` VALUES ('13415','N_Falchion','Novice Falchion','4','0','0','0','59','0','0','1','3','414947','63','2','2','1','2','150','0','2','0','','','');
REPLACE INTO `item_db_re` VALUES ('13416','Krieger_Onehand_Sword1','Glorious Flamberge','4','20','10','0','130','0','0','1','0','414947','63','2','2','4','80','150','1','2','0','bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(getrefine()>5) { bonus2 bAddRace,RC_DemiHuman,pow(((getrefine()>14)?14:getrefine())-4,2); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>6) bonus bAspdRate,5; if(getrefine()>8) { bonus bAspdRate,5; bonus4 bAutoSpellOnSkill,SM_BASH,NPC_CRITICALWOUND,2,200; }','','');
REPLACE INTO `item_db_re` VALUES ('13417','Krieger_Onehand_Sword2','Glorious Rapier','4','20','10','0','130','80','0','1','0','414947','63','2','2','4','80','150','1','2','0','bonus bInt,6; bonus bUnbreakableWeapon,0; if(getrefine()>5) bonus bUseSPrate,-10; if(getrefine()>8) bonus bInt,5;','','');
diff --git a/sql-files/upgrades/2013-11-18--08-23.sql b/sql-files/upgrades/2013-11-18--08-23.sql
new file mode 100644
index 000000000..d5da5fd95
--- /dev/null
+++ b/sql-files/upgrades/2013-11-18--08-23.sql
@@ -0,0 +1,65 @@
+#1384763034
+
+-- Note: If you're running a MySQL version earlier than 5.0 (or if this scripts fails for you for any reason)
+-- you'll need to run the following queries manually:
+--
+-- [ Both Pre-Renewal and Renewal ]
+-- ALTER TABLE item_db2 ADD COLUMN `bindonequip` tinyint(1) unsigned DEFAULT NULL AFTER `view`;
+-- INSERT INTO `sql_updates` (`timestamp`) VALUES (1384763034);
+--
+-- [ End ]
+-- What follows is the automated script that does all of the above.
+
+DELIMITER $$
+
+DROP PROCEDURE IF EXISTS alter_if_not_exists $$
+DROP PROCEDURE IF EXISTS alter_if_exists $$
+
+CREATE PROCEDURE alter_if_not_exists(my_table TINYTEXT, my_column TINYTEXT, my_command TINYTEXT, my_predicate TEXT)
+BEGIN
+ set @dbname = DATABASE();
+ IF EXISTS (
+ SELECT * FROM information_schema.TABLES
+ WHERE TABLE_SCHEMA = @dbname
+ AND TABLE_NAME = my_table
+ ) AND NOT EXISTS (
+ SELECT * FROM information_schema.COLUMNS
+ WHERE TABLE_SCHEMA = @dbname
+ AND TABLE_NAME = my_table
+ AND COLUMN_NAME = my_column
+ )
+ THEN
+ SET @q = CONCAT('ALTER TABLE ', @dbname, '.', my_table, ' ',
+ my_command, ' `', my_column, '` ', my_predicate);
+ PREPARE STMT FROM @q;
+ EXECUTE STMT;
+ END IF;
+
+END $$
+
+CREATE PROCEDURE alter_if_exists(my_table TINYTEXT, my_column TINYTEXT, my_command TINYTEXT, my_predicate TEXT)
+BEGIN
+ set @dbname = DATABASE();
+ IF EXISTS (
+ SELECT * FROM information_schema.COLUMNS
+ WHERE TABLE_SCHEMA = @dbname
+ AND TABLE_NAME = my_table
+ AND COLUMN_NAME = my_column
+ )
+ THEN
+ SET @q = CONCAT('ALTER TABLE ', @dbname, '.', my_table, ' ',
+ my_command, ' `', my_column, '` ', my_predicate);
+ PREPARE STMT FROM @q;
+ EXECUTE STMT;
+ END IF;
+
+END $$
+
+CALL alter_if_not_exists('item_db2', 'bindonequip', 'ADD COLUMN', 'tinyint(1) unsigned DEFAULT NULL AFTER `view`') $$
+
+DROP PROCEDURE IF EXISTS alter_if_not_exists $$
+DROP PROCEDURE IF EXISTS alter_if_exists $$
+
+DELIMITER ';'
+
+INSERT INTO `sql_updates` (`timestamp`) VALUES (1384763034);
diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt
index 1e76ee41b..9b7ad20d8 100644
--- a/sql-files/upgrades/index.txt
+++ b/sql-files/upgrades/index.txt
@@ -13,4 +13,5 @@
2013-11-09--00-03.sql
2013-11-15--00-06.sql
2013-11-15--19-57.sql
-2013-11-16--07-49.sql \ No newline at end of file
+2013-11-16--07-49.sql
+2013-11-18--08-23.sql
diff --git a/src/char/char.c b/src/char/char.c
index ce05f32f4..f1b95474e 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1004,7 +1004,7 @@ int mmo_chars_fromsql(struct char_session_data* sd, uint8* buf)
struct mmo_charstatus p;
int j = 0, i;
char last_map[MAP_NAME_LENGTH_EXT];
- size_t unban_time;
+ time_t unban_time;
stmt = SQL->StmtMalloc(sql_handle);
if( stmt == NULL ) {
@@ -1949,9 +1949,9 @@ void mmo_char_send099d(int fd, struct char_session_data *sd) {
void mmo_char_send020d(int fd, struct char_session_data *sd) {
int i;
time_t now = time(NULL);
-
- ARR_FIND(0, MAX_CHARS, i, sd->unban_time[i] > now);
-
+
+ ARR_FIND(0, MAX_CHARS, i, sd->unban_time[i]);
+
if( i != MAX_CHARS ) {
int c;
@@ -1960,9 +1960,19 @@ void mmo_char_send020d(int fd, struct char_session_data *sd) {
WFIFOW(fd, 0) = 0x20d;
for(i = 0, c = 0; i < MAX_CHARS; i++) {
- if( sd->unban_time[i] > now ) {
- WFIFOL(fd, 4 + (24*c)) = sd->found_char[i];
+ if( sd->unban_time[i] ) {
timestamp2string((char*)WFIFOP(fd,8 + (28*c)), 20, sd->unban_time[i], "%Y-%m-%d %H:%M:%S");
+
+ if( sd->unban_time[i] > now )
+ WFIFOL(fd, 4 + (24*c)) = sd->found_char[i];
+ else {
+ /* reset -- client keeps this information even if you logout so we need to clear */
+ WFIFOL(fd, 4 + (24*c)) = 0;
+ /* also update on mysql */
+ sd->unban_time[i] = 0;
+ if( SQL_ERROR == SQL->Query(sql_handle, "UPDATE `%s` SET `unban_time`='0' WHERE `char_id`='%d' LIMIT 1", char_db, sd->found_char[i]) )
+ Sql_ShowDebug(sql_handle);
+ }
c++;
}
}
@@ -2338,7 +2348,7 @@ int parse_fromlogin(int fd) {
#else
mmo_char_send006b(i, sd);
#endif
- #if PACKETVER >= 20080000
+ #if PACKETVER >= 20060819
mmo_char_send020d(i, sd);
#endif
#if PACKETVER >= 20110309
@@ -3301,7 +3311,7 @@ int parse_frommap(int fd)
unsigned char buf[11];
WBUFW(buf,0) = 0x2b14;
- WBUFL(buf,2) = account_id;
+ WBUFL(buf,2) = char_id;
WBUFB(buf,6) = 2;
WBUFL(buf,7) = (unsigned int)timestamp;
mapif_sendall(buf, 11);
diff --git a/src/map/battle.c b/src/map/battle.c
index 32e450bc0..cd8c36b69 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4696,11 +4696,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
if( (i = battle->adjust_skill_damage(src->m,skill_id)) )
ATK_RATE(i);
- #ifdef RENEWAL
- if( skill_id && (wd.damage+wd.damage2) ){
- RE_SKILL_REDUCTION();
- }
- #endif
+
if( sd ) {
if (skill_id && (i = pc->skillatk_bonus(sd, skill_id)))
ATK_ADDRATE(i);
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 56572d492..5927e31bf 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -966,21 +966,21 @@ int chrif_deadopt(int father_id, int mother_id, int child_id) {
}
/*==========================================
- * Disconnection of a player (account has been banned of has a status, from login-server) by [Yor]
+ * Disconnection of a player (account or char has been banned of has a status, from login or char server) by [Yor]
*------------------------------------------*/
-int chrif_accountban(int fd) {
- int acc;
+int chrif_idbanned(int fd) {
+ int id;
struct map_session_data *sd;
- acc = RFIFOL(fd,2);
+ id = RFIFOL(fd,2);
if ( battle_config.etc_log )
- ShowNotice("chrif_accountban %d.\n", acc);
+ ShowNotice("chrif_idbanned %d.\n", id);
- sd = map->id2sd(acc);
+ sd = ( RFIFOB(fd,6) == 2 ) ? map->charid2sd(id) : map->id2sd(id);
- if ( acc < 0 || sd == NULL ) {
- ShowError("chrif_accountban failed - player not online.\n");
+ if ( id < 0 || sd == NULL ) {
+ /* player not online or unknown id, either way no error is necessary (since if you try to ban a offline char it still works) */
return 0;
}
@@ -1453,7 +1453,7 @@ int chrif_parse(int fd) {
case 0x2b0d: chrif->changedsex(fd); break;
case 0x2b0f: chrif->char_ask_name_answer(RFIFOL(fd,2), (char*)RFIFOP(fd,6), RFIFOW(fd,30), RFIFOW(fd,32)); break;
case 0x2b12: chrif->divorceack(RFIFOL(fd,2), RFIFOL(fd,6)); break;
- case 0x2b14: chrif->accountban(fd); break;
+ case 0x2b14: chrif->idbanned(fd); break;
case 0x2b1b: chrif->recvfamelist(fd); break;
case 0x2b1d: chrif->load_scdata(fd); break;
case 0x2b1e: chrif->update_ip(fd); break;
@@ -1748,7 +1748,7 @@ void chrif_defaults(void) {
chrif->changemapserverack = chrif_changemapserverack;
chrif->changedsex = chrif_changedsex;
chrif->divorceack = chrif_divorceack;
- chrif->accountban = chrif_accountban;
+ chrif->idbanned = chrif_idbanned;
chrif->recvfamelist = chrif_recvfamelist;
chrif->load_scdata = chrif_load_scdata;
chrif->update_ip = chrif_update_ip;
diff --git a/src/map/chrif.h b/src/map/chrif.h
index 56aa569a3..b69d34210 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -127,7 +127,7 @@ struct chrif_interface {
int (*changemapserverack) (int account_id, int login_id1, int login_id2, int char_id, short map_index, short x, short y, uint32 ip, uint16 port);
int (*changedsex) (int fd);
int (*divorceack) (int char_id, int partner_id);
- int (*accountban) (int fd);
+ int (*idbanned) (int fd);
int (*recvfamelist) (int fd);
int (*load_scdata) (int fd);
void (*update_ip) (int fd);
diff --git a/src/map/clif.c b/src/map/clif.c
index dc3b00e6a..84976d67c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -17966,6 +17966,22 @@ void clif_notify_bounditem(struct map_session_data *sd, unsigned short index) {
clif->send(&p,sizeof(p), &sd->bl, SELF);
}
+
+/* (GM) right click -> 'remove all equipment' */
+void clif_parse_GMFullStrip(int fd, struct map_session_data *sd) {
+ struct map_session_data *tsd = map->id2sd(RFIFOL(fd,2));
+ int i;
+
+ /* TODO maybe this could be a new permission? using gm level in the meantime */
+ if( !tsd || pc->get_group_level(tsd) >= pc->get_group_level(sd) )
+ return;
+
+ for( i = 0; i < EQI_MAX; i++ ) {
+ if( tsd->equip_index[ i ] >= 0 )
+ pc->unequipitem( tsd , tsd->equip_index[ i ] , 2 );
+ }
+}
+
/* */
unsigned short clif_decrypt_cmd( int cmd, struct map_session_data *sd ) {
if( sd ) {
@@ -18914,6 +18930,7 @@ void clif_defaults(void) {
clif->pGMRc = clif_parse_GMRc;
clif->pGMReqAccountName = clif_parse_GMReqAccountName;
clif->pGMChangeMapType = clif_parse_GMChangeMapType;
+ clif->pGMFullStrip = clif_parse_GMFullStrip;
clif->pPMIgnore = clif_parse_PMIgnore;
clif->pPMIgnoreAll = clif_parse_PMIgnoreAll;
clif->pPMIgnoreList = clif_parse_PMIgnoreList;
diff --git a/src/map/clif.h b/src/map/clif.h
index 043f7dd3a..88f3383d1 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1162,6 +1162,7 @@ struct clif_interface {
void (*pGMRc) (int fd, struct map_session_data* sd);
void (*pGMReqAccountName) (int fd, struct map_session_data *sd);
void (*pGMChangeMapType) (int fd, struct map_session_data *sd);
+ void (*pGMFullStrip) (int fd, struct map_session_data *sd);
void (*pPMIgnore) (int fd, struct map_session_data* sd);
void (*pPMIgnoreAll) (int fd, struct map_session_data *sd);
void (*pPMIgnoreList) (int fd,struct map_session_data *sd);
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 51986fcf6..9c3ff4138 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1532,6 +1532,24 @@ int itemdb_gendercheck(struct item_data *id)
return (battle_config.ignore_items_gender) ? 2 : id->sex;
}
+
+/**
+ * Validates an item DB entry and inserts it into the database.
+ * This function is called after preparing the item entry data, and it takes
+ * care of inserting it and cleaning up any remainders of the previous one.
+ *
+ * @param *entry Pointer to the new item_data entry. Ownership is NOT taken,
+ * but the content is modified to reflect the validation.
+ * @param n Ordinal number of the entry, to be displayed in case of
+ * validation errors.
+ * @param *source Source of the entry (table or file name), to be displayed in
+ * case of validation errors.
+ * @return Nameid of the validated entry, or 0 in case of failure.
+ *
+ * Note: This is safe to call if the new entry is a copy of the old one (i.e.
+ * item_db2 inheritance), as it will make sure not to free any scripts still in
+ * use in the new entry.
+ */
int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
struct item_data *item;
@@ -1594,7 +1612,7 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
if( !entry->elvmax )
entry->elvmax = MAX_LEVEL;
- else if( entry->elvmax > entry->elv )
+ else if( entry->elvmax < entry->elv )
entry->elvmax = entry->elv;
if( entry->type != IT_ARMOR && entry->type != IT_WEAPON && !entry->flag.no_refine )
@@ -1607,15 +1625,15 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
// Validated. Finally insert it
item = itemdb->load(entry->nameid);
- if (item->script) {
+ if (item->script && item->script != entry->script) { // Don't free if it's inheriting the same script
script->free_code(item->script);
item->script = NULL;
}
- if (item->equip_script) {
+ if (item->equip_script && item->equip_script != entry->equip_script) { // Don't free if it's inheriting the same script
script->free_code(item->equip_script);
item->equip_script = NULL;
}
- if (item->unequip_script) {
+ if (item->unequip_script && item->unequip_script != entry->unequip_script) { // Don't free if it's inheriting the same script
script->free_code(item->unequip_script);
item->unequip_script = NULL;
}
@@ -1623,9 +1641,20 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) {
*item = *entry;
return item->nameid;
}
-/*==========================================
- * processes one itemdb entry
- *------------------------------------------*/
+
+/**
+ * Processes one itemdb entry from the sql backend, loading and inserting it
+ * into the item database.
+ *
+ * @param *handle MySQL connection handle. It is expected to have data
+ * available (i.e. already queried) and it won't be freed (it
+ * is care of the caller to do so)
+ * @param n Ordinal number of the entry, to be displayed in case of
+ * validation errors.
+ * @param *source Source of the entry (table name), to be displayed in case of
+ * validation errors.
+ * @return Nameid of the validated entry, or 0 in case of failure.
+ */
int itemdb_readdb_sql_sub(Sql *handle, int n, const char *source) {
struct item_data id = { 0 };
char *data = NULL;
@@ -1686,6 +1715,19 @@ int itemdb_readdb_sql_sub(Sql *handle, int n, const char *source) {
return itemdb->validate_entry(&id, n, source);
}
+/**
+ * Processes one itemdb entry from the sql backend, loading and inserting it
+ * into the item database.
+ *
+ * @param *it Libconfig setting entry. It is expected to be valid and it
+ * won't be freed (it is care of the caller to do so if
+ * necessary)
+ * @param n Ordinal number of the entry, to be displayed in case of
+ * validation errors.
+ * @param *source Source of the entry (file name), to be displayed in case of
+ * validation errors.
+ * @return Nameid of the validated entry, or 0 in case of failure.
+ */
int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source) {
struct item_data id = { 0 };
config_setting_t *t = NULL;
@@ -1845,11 +1887,14 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source)
return itemdb->validate_entry(&id, n, source);
}
-/*==========================================
- * Reading item from item db
- * item_db2 overwriting item_db
- *------------------------------------------*/
-int itemdb_readdb(const char *filename) {
+/**
+ * Reads from a libconfig-formatted itemdb file and inserts the found entries into the
+ * item database, overwriting duplicate ones (i.e. item_db2 overriding item_db.)
+ *
+ * @param *filename File name, relative to the database path.
+ * @return The number of found entries.
+ */
+int itemdb_readdb_libconfig(const char *filename) {
bool duplicate[MAX_ITEMDB];
config_t item_db_conf;
config_setting_t *itdb, *it;
@@ -1880,44 +1925,43 @@ int itemdb_readdb(const char *filename) {
config_destroy(&item_db_conf);
ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
- return 0;
+ return count;
}
-/*======================================
- * item_db table reading
- *======================================*/
-int itemdb_read_sqldb(void) {
- const char* item_db_name[] = {
-#ifdef RENEWAL
- map->item_db_re_db,
-#else // not RENEWAL
- map->item_db_db,
-#endif // RENEWAL
- map->item_db2_db };
- int fi;
-
- for( fi = 0; fi < ARRAYLENGTH(item_db_name); ++fi ) {
- int i = 0;
- uint32 count = 0;
+
+/**
+ * Reads from a sql itemdb table and inserts the found entries into the item
+ * database, overwriting duplicate ones (i.e. item_db2 overriding item_db.)
+ *
+ * @param *tablename Table name to query.
+ * @return The number of found entries.
+ */
+int itemdb_readdb_sql(const char *tablename) {
+ int i = 0, count = 0;
- // retrieve all rows from the item database
- if( SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT * FROM `%s`", item_db_name[fi]) ) {
- Sql_ShowDebug(map->mysql_handle);
- continue;
- }
+ // retrieve all rows from the item database
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "SELECT `id`, `name_english`, `name_japanese`, `type`,"
+ " `price_buy`, `price_sell`, `weight`, `atk`,"
+ " `matk`, `defence`, `range`, `slots`,"
+ " `equip_jobs`, `equip_upper`, `equip_genders`, `equip_locations`,"
+ " `weapon_level`, `equip_level_min`, `equip_level_max`, `refineable`,"
+ " `view`, `bindonequip`, `script`, `equip_script`, `unequip_script`"
+ "FROM `%s`", tablename) ) {
+ Sql_ShowDebug(map->mysql_handle);
+ return 0;
+ }
- // process rows one by one
- while( SQL_SUCCESS == SQL->NextRow(map->mysql_handle) ) {
- if( itemdb->readdb_sql_sub(map->mysql_handle, i++, item_db_name[fi]) )
- count++;
- }
+ // process rows one by one
+ while( SQL_SUCCESS == SQL->NextRow(map->mysql_handle) ) {
+ if( itemdb->readdb_sql_sub(map->mysql_handle, i++, tablename) )
+ count++;
+ }
- // free the query result
- SQL->FreeResult(map->mysql_handle);
+ // free the query result
+ SQL->FreeResult(map->mysql_handle);
- ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, item_db_name[fi]);
- }
+ ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, tablename);
- return 0;
+ return count;
}
/*==========================================
@@ -1963,23 +2007,32 @@ int itemdb_uid_load() {
return 0;
}
-/*====================================
- * read all item-related databases
- *------------------------------------*/
+/**
+ * Reads all item-related databases.
+ */
void itemdb_read(bool minimal) {
int i;
DBData prev;
- if (map->db_use_sql_item_db)
- itemdb->read_sqldb();
- else {
+ if (map->db_use_sql_item_db) {
+ const char* item_db_name[] = {
+#ifdef RENEWAL
+ map->item_db_re_db,
+#else // not RENEWAL
+ map->item_db_db,
+#endif // RENEWAL
+ map->item_db2_db
+ };
+ for(i = 0; i < ARRAYLENGTH(item_db_name); i++)
+ itemdb->readdb_sql(item_db_name[i]);
+ } else {
const char* filename[] = {
DBPATH"item_db.conf",
"item_db2.conf",
};
for(i = 0; i < ARRAYLENGTH(filename); i++)
- itemdb->readdb(filename[i]);
+ itemdb->readdb_libconfig(filename[i]);
}
for( i = 0; i < ARRAYLENGTH(itemdb->array); ++i ) {
@@ -2001,7 +2054,7 @@ void itemdb_read(bool minimal) {
sv->readdb(map->db_path, "item_avail.txt", ',', 2, 2, -1, itemdb->read_itemavail);
sv->readdb(map->db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, itemdb->read_itemtrade);
- sv->readdb(map->db_path, DBPATH"item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay);
+ sv->readdb(map->db_path, DBPATH"item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay);
sv->readdb(map->db_path, "item_stack.txt", ',', 3, 3, -1, itemdb->read_stack);
sv->readdb(map->db_path, DBPATH"item_buyingstore.txt", ',', 1, 1, -1, itemdb->read_buyingstore);
sv->readdb(map->db_path, "item_nouse.txt", ',', 3, 3, -1, itemdb->read_nouse);
@@ -2285,8 +2338,8 @@ void itemdb_defaults(void) {
itemdb->validate_entry = itemdb_validate_entry;
itemdb->readdb_sql_sub = itemdb_readdb_sql_sub;
itemdb->readdb_libconfig_sub = itemdb_readdb_libconfig_sub;
- itemdb->readdb = itemdb_readdb;
- itemdb->read_sqldb = itemdb_read_sqldb;
+ itemdb->readdb_libconfig = itemdb_readdb_libconfig;
+ itemdb->readdb_sql = itemdb_readdb_sql;
itemdb->unique_id = itemdb_unique_id;
itemdb->uid_load = itemdb_uid_load;
itemdb->read = itemdb_read;
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index 092db52d7..3f31c79d4 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -350,8 +350,8 @@ struct itemdb_interface {
int (*validate_entry) (struct item_data *entry, int n, const char *source);
int (*readdb_sql_sub) (Sql *handle, int n, const char *source);
int (*readdb_libconfig_sub) (config_setting_t *it, int n, const char *source);
- int (*readdb) (const char *filename);
- int (*read_sqldb) (void);
+ int (*readdb_libconfig) (const char *filename);
+ int (*readdb_sql) (const char *tablename);
uint64 (*unique_id) (int8 flag, int64 value);
int (*uid_load) ();
void (*read) (bool minimal);
diff --git a/src/map/packets.h b/src/map/packets.h
index 55a85e182..08c73fdb0 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1613,7 +1613,7 @@ packet(0x020d,-1);
//2009-10-27aRagexeRE
#if PACKETVER >= 20091027
- packet(0x07f5,6,clif->pGMReqAccountName,2);
+ packet(0x07f5,6,clif->pGMFullStrip,2);
packet(0x07f6,14);
#endif
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index b77505fbb..42a881a49 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -369,8 +369,8 @@ struct {
struct HPMHookPoint *HP_chrif_changedsex_post;
struct HPMHookPoint *HP_chrif_divorceack_pre;
struct HPMHookPoint *HP_chrif_divorceack_post;
- struct HPMHookPoint *HP_chrif_accountban_pre;
- struct HPMHookPoint *HP_chrif_accountban_post;
+ struct HPMHookPoint *HP_chrif_idbanned_pre;
+ struct HPMHookPoint *HP_chrif_idbanned_post;
struct HPMHookPoint *HP_chrif_recvfamelist_pre;
struct HPMHookPoint *HP_chrif_recvfamelist_post;
struct HPMHookPoint *HP_chrif_load_scdata_pre;
@@ -1561,6 +1561,8 @@ struct {
struct HPMHookPoint *HP_clif_pGMReqAccountName_post;
struct HPMHookPoint *HP_clif_pGMChangeMapType_pre;
struct HPMHookPoint *HP_clif_pGMChangeMapType_post;
+ struct HPMHookPoint *HP_clif_pGMFullStrip_pre;
+ struct HPMHookPoint *HP_clif_pGMFullStrip_post;
struct HPMHookPoint *HP_clif_pPMIgnore_pre;
struct HPMHookPoint *HP_clif_pPMIgnore_post;
struct HPMHookPoint *HP_clif_pPMIgnoreAll_pre;
@@ -2541,10 +2543,10 @@ struct {
struct HPMHookPoint *HP_itemdb_readdb_sql_sub_post;
struct HPMHookPoint *HP_itemdb_readdb_libconfig_sub_pre;
struct HPMHookPoint *HP_itemdb_readdb_libconfig_sub_post;
- struct HPMHookPoint *HP_itemdb_readdb_pre;
- struct HPMHookPoint *HP_itemdb_readdb_post;
- struct HPMHookPoint *HP_itemdb_read_sqldb_pre;
- struct HPMHookPoint *HP_itemdb_read_sqldb_post;
+ struct HPMHookPoint *HP_itemdb_readdb_libconfig_pre;
+ struct HPMHookPoint *HP_itemdb_readdb_libconfig_post;
+ struct HPMHookPoint *HP_itemdb_readdb_sql_pre;
+ struct HPMHookPoint *HP_itemdb_readdb_sql_post;
struct HPMHookPoint *HP_itemdb_unique_id_pre;
struct HPMHookPoint *HP_itemdb_unique_id_post;
struct HPMHookPoint *HP_itemdb_uid_load_pre;
@@ -5328,8 +5330,8 @@ struct {
int HP_chrif_changedsex_post;
int HP_chrif_divorceack_pre;
int HP_chrif_divorceack_post;
- int HP_chrif_accountban_pre;
- int HP_chrif_accountban_post;
+ int HP_chrif_idbanned_pre;
+ int HP_chrif_idbanned_post;
int HP_chrif_recvfamelist_pre;
int HP_chrif_recvfamelist_post;
int HP_chrif_load_scdata_pre;
@@ -6520,6 +6522,8 @@ struct {
int HP_clif_pGMReqAccountName_post;
int HP_clif_pGMChangeMapType_pre;
int HP_clif_pGMChangeMapType_post;
+ int HP_clif_pGMFullStrip_pre;
+ int HP_clif_pGMFullStrip_post;
int HP_clif_pPMIgnore_pre;
int HP_clif_pPMIgnore_post;
int HP_clif_pPMIgnoreAll_pre;
@@ -7500,10 +7504,10 @@ struct {
int HP_itemdb_readdb_sql_sub_post;
int HP_itemdb_readdb_libconfig_sub_pre;
int HP_itemdb_readdb_libconfig_sub_post;
- int HP_itemdb_readdb_pre;
- int HP_itemdb_readdb_post;
- int HP_itemdb_read_sqldb_pre;
- int HP_itemdb_read_sqldb_post;
+ int HP_itemdb_readdb_libconfig_pre;
+ int HP_itemdb_readdb_libconfig_post;
+ int HP_itemdb_readdb_sql_pre;
+ int HP_itemdb_readdb_sql_post;
int HP_itemdb_unique_id_pre;
int HP_itemdb_unique_id_post;
int HP_itemdb_uid_load_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index 57c243913..2dead85db 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -193,7 +193,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(chrif->changemapserverack, HP_chrif_changemapserverack) },
{ HP_POP(chrif->changedsex, HP_chrif_changedsex) },
{ HP_POP(chrif->divorceack, HP_chrif_divorceack) },
- { HP_POP(chrif->accountban, HP_chrif_accountban) },
+ { HP_POP(chrif->idbanned, HP_chrif_idbanned) },
{ HP_POP(chrif->recvfamelist, HP_chrif_recvfamelist) },
{ HP_POP(chrif->load_scdata, HP_chrif_load_scdata) },
{ HP_POP(chrif->update_ip, HP_chrif_update_ip) },
@@ -790,6 +790,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pGMRc, HP_clif_pGMRc) },
{ HP_POP(clif->pGMReqAccountName, HP_clif_pGMReqAccountName) },
{ HP_POP(clif->pGMChangeMapType, HP_clif_pGMChangeMapType) },
+ { HP_POP(clif->pGMFullStrip, HP_clif_pGMFullStrip) },
{ HP_POP(clif->pPMIgnore, HP_clif_pPMIgnore) },
{ HP_POP(clif->pPMIgnoreAll, HP_clif_pPMIgnoreAll) },
{ HP_POP(clif->pPMIgnoreList, HP_clif_pPMIgnoreList) },
@@ -1289,8 +1290,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(itemdb->validate_entry, HP_itemdb_validate_entry) },
{ HP_POP(itemdb->readdb_sql_sub, HP_itemdb_readdb_sql_sub) },
{ HP_POP(itemdb->readdb_libconfig_sub, HP_itemdb_readdb_libconfig_sub) },
- { HP_POP(itemdb->readdb, HP_itemdb_readdb) },
- { HP_POP(itemdb->read_sqldb, HP_itemdb_read_sqldb) },
+ { HP_POP(itemdb->readdb_libconfig, HP_itemdb_readdb_libconfig) },
+ { HP_POP(itemdb->readdb_sql, HP_itemdb_readdb_sql) },
{ HP_POP(itemdb->unique_id, HP_itemdb_unique_id) },
{ HP_POP(itemdb->uid_load, HP_itemdb_uid_load) },
{ HP_POP(itemdb->read, HP_itemdb_read) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 5511959e9..836e4e124 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -4793,13 +4793,13 @@ int HP_chrif_divorceack(int char_id, int partner_id) {
}
return retVal___;
}
-int HP_chrif_accountban(int fd) {
+int HP_chrif_idbanned(int fd) {
int hIndex = 0;
int retVal___ = 0;
- if( HPMHooks.count.HP_chrif_accountban_pre ) {
+ if( HPMHooks.count.HP_chrif_idbanned_pre ) {
int (*preHookFunc) (int *fd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_chrif_accountban_pre[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chrif_idbanned_pre[hIndex].func;
retVal___ = preHookFunc(&fd);
}
if( *HPMforce_return ) {
@@ -4808,12 +4808,12 @@ int HP_chrif_accountban(int fd) {
}
}
{
- retVal___ = HPMHooks.source.chrif.accountban(fd);
+ retVal___ = HPMHooks.source.chrif.idbanned(fd);
}
- if( HPMHooks.count.HP_chrif_accountban_post ) {
+ if( HPMHooks.count.HP_chrif_idbanned_post ) {
int (*postHookFunc) (int retVal___, int *fd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_accountban_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_chrif_accountban_post[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chrif_idbanned_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd);
}
}
@@ -19773,6 +19773,31 @@ void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) {
}
return;
}
+void HP_clif_pGMFullStrip(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pGMFullStrip_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_pre[hIndex].func;
+ preHookFunc(&fd, sd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pGMFullStrip(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pGMFullStrip_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_post[hIndex].func;
+ postHookFunc(&fd, sd);
+ }
+ }
+ return;
+}
void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_pPMIgnore_pre ) {
@@ -32402,13 +32427,13 @@ int HP_itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *sour
}
return retVal___;
}
-int HP_itemdb_readdb(const char *filename) {
+int HP_itemdb_readdb_libconfig(const char *filename) {
int hIndex = 0;
int retVal___ = 0;
- if( HPMHooks.count.HP_itemdb_readdb_pre ) {
+ if( HPMHooks.count.HP_itemdb_readdb_libconfig_pre ) {
int (*preHookFunc) (const char *filename);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_readdb_pre[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_pre[hIndex].func;
retVal___ = preHookFunc(filename);
}
if( *HPMforce_return ) {
@@ -32417,25 +32442,25 @@ int HP_itemdb_readdb(const char *filename) {
}
}
{
- retVal___ = HPMHooks.source.itemdb.readdb(filename);
+ retVal___ = HPMHooks.source.itemdb.readdb_libconfig(filename);
}
- if( HPMHooks.count.HP_itemdb_readdb_post ) {
+ if( HPMHooks.count.HP_itemdb_readdb_libconfig_post ) {
int (*postHookFunc) (int retVal___, const char *filename);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_readdb_post[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_post[hIndex].func;
retVal___ = postHookFunc(retVal___, filename);
}
}
return retVal___;
}
-int HP_itemdb_read_sqldb(void) {
+int HP_itemdb_readdb_sql(const char *tablename) {
int hIndex = 0;
int retVal___ = 0;
- if( HPMHooks.count.HP_itemdb_read_sqldb_pre ) {
- int (*preHookFunc) (void);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_pre[hIndex].func;
- retVal___ = preHookFunc();
+ if( HPMHooks.count.HP_itemdb_readdb_sql_pre ) {
+ int (*preHookFunc) (const char *tablename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_sql_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_itemdb_readdb_sql_pre[hIndex].func;
+ retVal___ = preHookFunc(tablename);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -32443,13 +32468,13 @@ int HP_itemdb_read_sqldb(void) {
}
}
{
- retVal___ = HPMHooks.source.itemdb.read_sqldb();
+ retVal___ = HPMHooks.source.itemdb.readdb_sql(tablename);
}
- if( HPMHooks.count.HP_itemdb_read_sqldb_post ) {
- int (*postHookFunc) (int retVal___);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_sqldb_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_itemdb_read_sqldb_post[hIndex].func;
- retVal___ = postHookFunc(retVal___);
+ if( HPMHooks.count.HP_itemdb_readdb_sql_post ) {
+ int (*postHookFunc) (int retVal___, const char *tablename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_sql_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_itemdb_readdb_sql_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, tablename);
}
}
return retVal___;
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index b3d389527..3c3981bdd 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -139,7 +139,7 @@ void do_db2sql(void) {
memset(&tosql.buf, 0, sizeof(tosql.buf) );
itemdb->clear(false);
- itemdb->readdb("re/item_db.conf");
+ itemdb->readdb_libconfig("re/item_db.conf");
fclose(tosql.fp);
@@ -152,7 +152,7 @@ void do_db2sql(void) {
totable();
itemdb->clear(false);
- itemdb->readdb("pre-re/item_db.conf");
+ itemdb->readdb_libconfig("pre-re/item_db.conf");
fclose(tosql.fp);
@@ -165,7 +165,7 @@ void do_db2sql(void) {
totable();
itemdb->clear(false);
- itemdb->readdb("item_db2.conf");
+ itemdb->readdb_libconfig("item_db2.conf");
fclose(tosql.fp);