summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/pre-re/item_group.conf18
-rw-r--r--db/re/item_group.conf18
-rw-r--r--db/re/mob_db.conf28
-rw-r--r--sql-files/mob_db_re.sql48
-rw-r--r--src/common/console.c1
-rw-r--r--src/common/sysinfo.c15
-rw-r--r--src/common/sysinfo.h1
-rw-r--r--src/common/timer.c64
-rw-r--r--src/map/skill.c79
-rw-r--r--src/map/status.c4
10 files changed, 226 insertions, 50 deletions
diff --git a/db/pre-re/item_group.conf b/db/pre-re/item_group.conf
index c2222552c..63f6efcb0 100644
--- a/db/pre-re/item_group.conf
+++ b/db/pre-re/item_group.conf
@@ -412,7 +412,14 @@ Gift_Box: (
"Piece_Of_Cake",
"Old_Violet_Box",
("Gift_Box",19),
- "Girl's_Diary",
+ ("Girl's_Diary",2),
+ "Emperium",
+ "Steel",
+ "Old_Blue_Box",
+ ("Elunium_Stone",2),
+ ("Oridecon",2),
+ ("Oridecon_Stone",5),
+ "Elunium",
)
Gift_Box_1: (
"Star_Crumb",
@@ -554,7 +561,14 @@ Gift_Box_2: (
"Piece_Of_Cake",
"Old_Violet_Box",
("Gift_Box",19),
- "Girl's_Diary",
+ ("Girl's_Diary",2),
+ "Emperium",
+ "Steel",
+ "Old_Blue_Box",
+ ("Elunium_Stone",2),
+ ("Oridecon",2),
+ ("Oridecon_Stone",5),
+ "Elunium",
)
Gift_Box_3: (
"Star_Crumb",
diff --git a/db/re/item_group.conf b/db/re/item_group.conf
index ddc5b28e2..5551fe51c 100644
--- a/db/re/item_group.conf
+++ b/db/re/item_group.conf
@@ -412,7 +412,14 @@ Gift_Box: (
"Piece_Of_Cake",
"Old_Violet_Box",
("Gift_Box",19),
- "Girl's_Diary",
+ ("Girl's_Diary",2),
+ "Emperium",
+ "Steel",
+ "Old_Blue_Box",
+ ("Elunium_Stone",2),
+ ("Oridecon",2),
+ ("Oridecon_Stone",5),
+ "Elunium",
)
Gift_Box_1: (
"Star_Crumb",
@@ -554,7 +561,14 @@ Gift_Box_2: (
"Piece_Of_Cake",
"Old_Violet_Box",
("Gift_Box",19),
- "Girl's_Diary",
+ ("Girl's_Diary",2),
+ "Emperium",
+ "Steel",
+ "Old_Blue_Box",
+ ("Elunium_Stone",2),
+ ("Oridecon",2),
+ ("Oridecon_Stone",5),
+ "Elunium",
)
Gift_Box_3: (
"Star_Crumb",
diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf
index baf357ae4..d4e4f4357 100644
--- a/db/re/mob_db.conf
+++ b/db/re/mob_db.conf
@@ -56848,6 +56848,7 @@ mob_db: (
Cannon_Spear: 20
Bible_Of_Promise2: 20
Blood_Thirst: 300
+ Randel_Card: 1
}
},
{
@@ -56897,6 +56898,7 @@ mob_db: (
Green_Operation_Coat: 20
Red_Ether_Bag: 2
Blood_Thirst: 300
+ Flamel_Card: 1
}
},
{
@@ -56946,6 +56948,7 @@ mob_db: (
Creeper_Bow: 20
Mental_Stick: 2
Blood_Thirst: 300
+ Celia_Card: 1
}
},
{
@@ -56996,6 +56999,7 @@ mob_db: (
Sura_Rampage: 20
Berserk: 10
Blood_Thirst: 300
+ Chen_Card: 1
}
},
{
@@ -57046,6 +57050,7 @@ mob_db: (
Catapult: 20
Black_Wing: 20
Blood_Thirst: 300
+ Gertie_Card: 1
}
},
{
@@ -57095,6 +57100,7 @@ mob_db: (
Geffenia_Book_Water: 20
Green_Whistle: 20
Blood_Thirst: 300
+ Alphoccio_Card: 1
}
},
{
@@ -57144,6 +57150,7 @@ mob_db: (
Assassin_Handcuffs: 20
Stem_Whip: 20
Blood_Thirst: 300
+ Trentini_Card: 1
}
},
{
@@ -57517,6 +57524,7 @@ mob_db: (
Bradium: 4000
Giant_Shield: 4000
Ancient_Dagger: 4000
+ Paladin_Card: 1
}
},
{
@@ -57576,6 +57584,7 @@ mob_db: (
End_Sektura: 4000
Ygnus_Stale: 4000
Giant_Axe: 4000
+ Creator_Card: 1
}
},
{
@@ -57633,6 +57642,7 @@ mob_db: (
Old_Card_Album: 6000
Bradium: 4000
Alchemy_Glove: 4000
+ Professor_Card: 1
}
},
{
@@ -57691,6 +57701,7 @@ mob_db: (
Carnium: 4000
Cakram: 4000
Kaiser_Knuckle: 4000
+ Champion_Card: 1
}
},
{
@@ -57749,6 +57760,7 @@ mob_db: (
Bradium: 4000
Scarletto_Nail: 4000
Aztoe_Nail: 4000
+ Stalker_Card: 1
}
},
{
@@ -57806,6 +57818,7 @@ mob_db: (
Old_Card_Album: 6000
Carnium: 4000
Mystic_Bow: 4000
+ Clown_Card: 1
}
},
{
@@ -57864,6 +57877,7 @@ mob_db: (
Bradium: 4000
Rosebine: 4000
Mystic_Bow: 4000
+ Gypsy_Card: 1
}
},
{
@@ -58180,6 +58194,7 @@ mob_db: (
Sg_Weapon_Supply_Box: 6000
Sg_White_Potion_Box: 4000
Sg_Blue_Potion_Box: 2000
+ Angry_Student_Pyuriel_Card: 1
}
},
{
@@ -58232,6 +58247,7 @@ mob_db: (
Sg_Weapon_Supply_Box: 100
Sg_White_Potion_Box: 1000
Sg_Blue_Potion_Box: 1000
+ Warrior_Lola_Card: 1
}
},
{
@@ -58289,6 +58305,7 @@ mob_db: (
Sg_Weapon_Supply_Box: 6000
Sg_White_Potion_Box: 4000
Sg_Blue_Potion_Box: 2000
+ Gioia_Card: 1
}
},
{
@@ -58340,6 +58357,7 @@ mob_db: (
Sg_Weapon_Supply_Box: 100
Sg_White_Potion_Box: 1000
Sg_Blue_Potion_Box: 1000
+ Elvira_Card: 1
}
},
{
@@ -58398,6 +58416,7 @@ mob_db: (
Sg_Weapon_Supply_Box: 6000
Sg_White_Potion_Box: 4000
Sg_Blue_Potion_Box: 2000
+ General_Daehyon_Card: 1
}
},
{
@@ -58450,6 +58469,7 @@ mob_db: (
Sg_Weapon_Supply_Box: 100
Sg_White_Potion_Box: 1000
Sg_Blue_Potion_Box: 1000
+ Armed_Guard_Soheon_Card: 1
}
},
{
@@ -58508,6 +58528,7 @@ mob_db: (
Sg_Weapon_Supply_Box: 6000
Sg_White_Potion_Box: 4000
Sg_Blue_Potion_Box: 2000
+ Guardian_Kades_Card: 1
}
},
{
@@ -58559,6 +58580,7 @@ mob_db: (
Sg_Weapon_Supply_Box: 100
Sg_White_Potion_Box: 1000
Sg_Blue_Potion_Box: 1000
+ Rudo_Card: 1
}
},
{
@@ -64933,6 +64955,9 @@ mob_db: (
Seed_Of_Yggdrasil: 3500
Crystal_Jewel__: 5500
}
+ Drops: {
+ Corruption_Root_Card: 1
+ }
},
{
Id: 2476
@@ -64982,6 +65007,9 @@ mob_db: (
Old_Violet_Box: 5000
Old_Card_Album: 2000
}
+ Drops: {
+ Amdarais_Card: 1
+ }
},
//2477,NG_WANDER_MAN
//2478,NG_RIDEWORD
diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql
index 190f7910d..90d0e4caf 100644
--- a/sql-files/mob_db_re.sql
+++ b/sql-files/mob_db_re.sql
@@ -1236,13 +1236,13 @@ REPLACE INTO `mob_db` VALUES (2217,'M_TEDDY_BEAR','Teddy Bear','Teddy Bear',85,1
REPLACE INTO `mob_db` VALUES (2218,'E_OCTOPUS_LEG','Octopus Leg','Octopus Tentacle',1,60,1,27,20,1,8,9,2,5,6,1,1,0,6,5,10,12,1,3,21,0x83,400,1872,672,480,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);
REPLACE INTO `mob_db` VALUES (2219,'E_GIANT_OCTOPUS','Giant Octopus','Giant Octopus',1,60,1,27,20,1,8,9,2,5,6,1,1,0,6,5,10,12,1,3,21,0x83,400,1872,672,480,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);
REPLACE INTO `mob_db` VALUES (2220,'E_QUVE','Quve','Messenger of Devil',10,20,1,0,0,1,13,8,1,0,1,1,1,50,100,100,10,12,0,1,29,0x83,150,1248,1248,576,0,0,0,0,0,0,0,558,10000,561,6000,529,10000,530,10000,0,0,0,0,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2221,'RANDEL','Randal','Randel',141,478745,1,64734,48110,1,3055,1230,180,56,158,74,213,50,185,65,10,12,1,7,66,0x3095,180,864,864,288,0,0,0,0,0,0,0,7345,4000,6471,2,617,200,985,200,1435,20,2162,20,6470,300,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2222,'FLAMEL','Flamel','Flamel',141,316468,1,52794,46160,1,2017,1602,86,12,141,78,70,81,147,51,10,12,1,7,63,0x3095,180,1152,864,288,0,0,0,0,0,0,0,7345,4000,6471,2,617,200,984,200,15044,20,16010,2,6470,300,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2223,'CELIA','Celia','Celia',141,253145,1,44214,38034,1,1612,2450,74,312,136,99,61,121,121,49,10,12,1,7,68,0x3095,180,1152,864,288,0,0,0,0,0,0,0,7345,4000,6471,2,2853,40,985,200,18111,20,1654,2,6470,300,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2224,'CHEN','Chen','Chen',141,279562,25,51368,39620,1,2501,1248,125,56,122,81,83,130,201,61,10,12,1,6,81,0x3195,180,768,768,288,0,0,0,0,0,0,0,6471,2,7347,4000,617,200,984,200,1830,20,1814,10,6470,300,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2225,'GERTIE','Gertie','Gertie',141,266926,1,48534,40466,1,3684,1207,108,10,180,125,55,51,211,45,10,12,1,6,85,0x3195,150,864,864,288,0,0,0,0,0,0,0,6471,2,7347,4000,617,200,985,200,18109,20,13061,20,6470,300,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2226,'ALPHOCCIO','Alphoccio','Alphoccio',142,256202,1,44384,40644,1,1273,3076,84,15,120,97,71,181,81,81,10,12,1,7,64,0x3095,180,864,864,288,0,0,0,0,0,0,0,6471,2,7347,4000,617,200,984,200,2161,20,1930,20,6470,300,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2227,'TRENTINI','Trentini','Trentini',142,204962,1,31990,26496,2,1070,3206,70,12,115,81,65,194,95,76,10,12,1,7,64,0x3095,180,864,864,288,0,0,0,0,0,0,0,6471,2,7347,4000,2465,40,985,200,2892,20,1984,20,6470,300,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (2221,'RANDEL','Randal','Randel',141,478745,1,64734,48110,1,3055,1230,180,56,158,74,213,50,185,65,10,12,1,7,66,0x3095,180,864,864,288,0,0,0,0,0,0,0,7345,4000,6471,2,617,200,985,200,1435,20,2162,20,6470,300,0,0,0,0,4572,1);
+REPLACE INTO `mob_db` VALUES (2222,'FLAMEL','Flamel','Flamel',141,316468,1,52794,46160,1,2017,1602,86,12,141,78,70,81,147,51,10,12,1,7,63,0x3095,180,1152,864,288,0,0,0,0,0,0,0,7345,4000,6471,2,617,200,984,200,15044,20,16010,2,6470,300,0,0,0,0,4570,1);
+REPLACE INTO `mob_db` VALUES (2223,'CELIA','Celia','Celia',141,253145,1,44214,38034,1,1612,2450,74,312,136,99,61,121,121,49,10,12,1,7,68,0x3095,180,1152,864,288,0,0,0,0,0,0,0,7345,4000,6471,2,2853,40,985,200,18111,20,1654,2,6470,300,0,0,0,0,4568,1);
+REPLACE INTO `mob_db` VALUES (2224,'CHEN','Chen','Chen',141,279562,25,51368,39620,1,2501,1248,125,56,122,81,83,130,201,61,10,12,1,6,81,0x3195,180,768,768,288,0,0,0,0,0,0,0,6471,2,7347,4000,617,200,984,200,1830,20,1814,10,6470,300,0,0,0,0,4569,1);
+REPLACE INTO `mob_db` VALUES (2225,'GERTIE','Gertie','Gertie',141,266926,1,48534,40466,1,3684,1207,108,10,180,125,55,51,211,45,10,12,1,6,85,0x3195,150,864,864,288,0,0,0,0,0,0,0,6471,2,7347,4000,617,200,985,200,18109,20,13061,20,6470,300,0,0,0,0,4571,1);
+REPLACE INTO `mob_db` VALUES (2226,'ALPHOCCIO','Alphoccio','Alphoccio',142,256202,1,44384,40644,1,1273,3076,84,15,120,97,71,181,81,81,10,12,1,7,64,0x3095,180,864,864,288,0,0,0,0,0,0,0,6471,2,7347,4000,617,200,984,200,2161,20,1930,20,6470,300,0,0,0,0,4567,1);
+REPLACE INTO `mob_db` VALUES (2227,'TRENTINI','Trentini','Trentini',142,204962,1,31990,26496,2,1070,3206,70,12,115,81,65,194,95,76,10,12,1,7,64,0x3095,180,864,864,288,0,0,0,0,0,0,0,6471,2,7347,4000,2465,40,985,200,2892,20,1984,20,6470,300,0,0,0,0,4573,1);
REPLACE INTO `mob_db` VALUES (2228,'G_RANDEL','Paladin Randel','Randel',160,3163000,1,0,0,1,5537,3017,667,151,291,155,201,101,265,66,10,12,1,7,86,0x37B5,100,864,864,288,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);
REPLACE INTO `mob_db` VALUES (2229,'G_FLAMEL','Biochemist Flamel','Flamel',160,2531750,1,0,0,1,2355,2514,253,113,159,175,157,170,237,71,10,12,1,7,83,0x37B5,100,1152,864,288,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);
REPLACE INTO `mob_db` VALUES (2230,'G_CELIA','Scholar Celia','Celia',160,2025160,1,0,0,1,2481,3114,201,543,165,148,171,155,267,85,10,12,1,7,68,0x37B5,100,1152,864,288,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);
@@ -1250,13 +1250,13 @@ REPLACE INTO `mob_db` VALUES (2231,'G_CHEN','Champion Chen','Chen',160,2236500,1
REPLACE INTO `mob_db` VALUES (2232,'G_GERTIE','Stalker Gertie','Gertie',160,2135410,1,0,0,1,6162,1274,251,107,217,315,127,51,333,61,10,12,1,7,85,0x37B5,100,864,864,288,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);
REPLACE INTO `mob_db` VALUES (2233,'G_ALPHOCCIO','Minstel Alphoccio','Alphoccio',160,2049620,1,0,0,1,2641,3749,201,109,219,161,130,107,270,99,10,12,1,7,84,0x37B5,150,864,864,288,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);
REPLACE INTO `mob_db` VALUES (2234,'G_TRENTINI','Gypsy Trentini','Trentini',160,2049620,1,0,0,2,2016,4036,181,112,167,247,165,217,233,61,10,12,1,7,84,0x37B5,150,864,864,288,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);
-REPLACE INTO `mob_db` VALUES (2235,'B_RANDEL','Paladin Randel','Randel',160,6870000,1,7348978,3908302,1,5537,3017,667,151,291,155,201,101,265,66,10,12,1,7,86,0x37B5,100,864,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6224,4000,2160,4000,13062,4000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2236,'B_FLAMEL','Biochemist Flamel','Flamel',160,4230000,1,5223570,2630354,1,2355,2514,253,113,159,175,157,170,237,71,10,12,1,7,83,0x37B5,100,1152,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6223,4000,1393,4000,1392,4000,1387,4000,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2237,'B_CELIA','Scholar Celia','Celia',160,3847804,1,5027308,2509792,1,2481,3114,201,543,165,148,171,155,267,85,10,12,1,7,68,0x37B5,100,1152,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6224,4000,2854,4000,0,0,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2238,'B_CHEN','Champion Chen','Chen',160,4249350,1553,5113568,2934974,1,3617,1947,216,134,180,165,165,50,298,66,10,12,1,6,81,0x37B5,100,768,768,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6223,4000,1285,4000,1813,4000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2239,'B_GERTIE','Stalker Gertie','Gertie',160,4057279,1,4420698,2691274,1,6162,1274,251,107,217,315,127,51,333,61,10,12,1,6,85,0x37B5,100,864,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6224,4000,13070,4000,13069,4000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2240,'B_ALPHOCCIO','Minstel Alphoccio','Alphoccio',160,3894278,1,4226036,2468972,1,2641,3749,201,109,219,161,130,107,270,99,10,12,1,7,84,0x37B5,150,864,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6223,4000,18103,4000,0,0,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2241,'B_TRENTINI','Gypsy Trentini','Trentini',160,3894278,1,4463758,2563096,2,2016,4036,181,112,167,247,165,217,233,61,10,12,1,7,84,0x37B5,150,864,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6224,4000,1985,4000,18103,4000,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (2235,'B_RANDEL','Paladin Randel','Randel',160,6870000,1,7348978,3908302,1,5537,3017,667,151,291,155,201,101,265,66,10,12,1,7,86,0x37B5,100,864,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6224,4000,2160,4000,13062,4000,0,0,0,0,0,0,4565,1);
+REPLACE INTO `mob_db` VALUES (2236,'B_FLAMEL','Biochemist Flamel','Flamel',160,4230000,1,5223570,2630354,1,2355,2514,253,113,159,175,157,170,237,71,10,12,1,7,83,0x37B5,100,1152,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6223,4000,1393,4000,1392,4000,1387,4000,0,0,0,0,4563,1);
+REPLACE INTO `mob_db` VALUES (2237,'B_CELIA','Scholar Celia','Celia',160,3847804,1,5027308,2509792,1,2481,3114,201,543,165,148,171,155,267,85,10,12,1,7,68,0x37B5,100,1152,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6224,4000,2854,4000,0,0,0,0,0,0,0,0,4561,1);
+REPLACE INTO `mob_db` VALUES (2238,'B_CHEN','Champion Chen','Chen',160,4249350,1553,5113568,2934974,1,3617,1947,216,134,180,165,165,50,298,66,10,12,1,6,81,0x37B5,100,768,768,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6223,4000,1285,4000,1813,4000,0,0,0,0,0,0,4562,1);
+REPLACE INTO `mob_db` VALUES (2239,'B_GERTIE','Stalker Gertie','Gertie',160,4057279,1,4420698,2691274,1,6162,1274,251,107,217,315,127,51,333,61,10,12,1,6,85,0x37B5,100,864,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6224,4000,13070,4000,13069,4000,0,0,0,0,0,0,4564,1);
+REPLACE INTO `mob_db` VALUES (2240,'B_ALPHOCCIO','Minstel Alphoccio','Alphoccio',160,3894278,1,4226036,2468972,1,2641,3749,201,109,219,161,130,107,270,99,10,12,1,7,84,0x37B5,150,864,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6223,4000,18103,4000,0,0,0,0,0,0,0,0,4560,1);
+REPLACE INTO `mob_db` VALUES (2241,'B_TRENTINI','Gypsy Trentini','Trentini',160,3894278,1,4463758,2563096,2,2016,4036,181,112,167,247,165,217,233,61,10,12,1,7,84,0x37B5,150,864,864,288,0,12246,5000,617,5000,6471,5000,12623,10000,12616,10000,616,6000,6224,4000,1985,4000,18103,4000,0,0,0,0,0,0,4566,1);
REPLACE INTO `mob_db` VALUES (2242,'MD_DESERT_WOLF','Desert Wolf','Desert Wolf',135,551578,1,0,0,1,676,59,151,39,151,69,63,72,98,42,10,12,1,6,20,0x83,150,420,420,288,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);
REPLACE INTO `mob_db` VALUES (2243,'MD_DESERT_WOLF_B','Baby Desert Wolf','Baby Desert Wolf',130,274531,1,0,0,1,33,8,13,123,101,12,8,121,17,7,10,12,0,6,20,0x83,130,900,900,240,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);
REPLACE INTO `mob_db` VALUES (2244,'QUEST_CHEN','Champion Chen','Dark Martial Arts Maste',130,300,1,0,0,1,103,23,25,56,122,81,83,130,201,61,10,12,1,1,81,0x83,300,768,768,288,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);
@@ -1264,14 +1264,14 @@ REPLACE INTO `mob_db` VALUES (2245,'EXP_TEST','EXP_TEST','Experience Test',1,100
REPLACE INTO `mob_db` VALUES (2246,'Q_WOOTAN_FIGHTER','Q_WOOTAN_FIGHTER','Wootan Fighter',95,9000,1,2800,4000,1,255,36,103,8,63,14,36,5,62,15,10,12,1,7,43,0x0,200,1344,1344,480,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);
REPLACE INTO `mob_db` VALUES (2247,'Q_INCREASE_SOIL','Q_INCREASE_SOIL','Mi Gao',95,20000,1,2800,4000,1,365,30,112,39,67,23,41,49,94,30,10,12,1,0,62,0x0,445,1056,1056,576,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);
REPLACE INTO `mob_db` VALUES (2248,'GOLDPORING','Golden Poring','Golden Poring',1,15,1,0,0,0,0,0,160,5,1,1,1,1,999,1,10,12,1,3,21,0x81,400,1872,672,480,0,0,0,0,0,0,0,6012,4000,6485,4000,6486,4000,6487,4000,7470,4000,7602,4000,12696,10000,12697,10000,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2249,'PYURIEL','Pyuriel','Angry Student Pyuriel',141,2205000,1,3000246,2400000,2,2515,1513,388,206,196,131,125,276,401,156,10,12,1,7,83,0x37B5,100,1380,1380,360,750061,616,5000,617,5000,617,5000,12623,200,617,6000,616,1000,12675,6000,12679,4000,12680,2000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2250,'LORA','Lora','Warrior Laura',136,500255,1,33134,27576,2,1985,1701,224,58,144,92,86,69,149,68,10,12,0,7,43,0x3795,130,1600,432,360,0,0,0,0,0,0,0,12623,10,617,6000,616,100,12675,100,12679,1000,12680,1000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2251,'GIOIA','Gioia','Gioia',146,2507989,1,3006902,2607094,1,1105,2601,436,218,180,201,156,190,299,77,10,12,2,0,84,0x37B5,100,2000,2000,432,751725,616,5000,617,5000,617,5000,12623,200,617,6000,616,1000,12675,6000,12679,4000,12680,2000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2252,'ELVIRA','Elvira','Elvira',138,501765,1,35694,27138,3,699,2101,171,68,189,105,92,85,198,72,10,12,0,0,64,0x3795,120,1224,1224,360,0,0,0,0,0,0,0,12623,10,617,6000,616,100,12675,100,12679,1000,12680,1000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2253,'DAEHYON','Daehyon','General Daehyon',142,2500148,1,3003122,2548440,2,2710,1410,494,123,116,123,154,99,217,98,10,12,2,7,62,0x37B5,100,900,792,432,750780,616,5000,617,5000,617,5000,12623,200,617,6000,616,1000,12675,6000,12679,4000,12680,2000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2254,'SOHEON','Soheon','Samurai Soheon',137,502015,1,31430,25080,2,1591,1036,210,178,118,244,98,126,246,102,10,12,1,7,64,0x3795,120,1008,1008,432,0,0,0,0,0,0,0,12623,10,617,6000,616,100,12675,100,12679,1000,12680,1000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2255,'KADES','Kades','Dark Guardian Kades',143,2505000,1,3208000,2620000,1,2201,2001,479,262,191,223,187,155,362,163,10,12,2,0,67,0x37B5,100,900,648,480,802000,616,5000,617,5000,617,5000,12623,200,617,6000,616,1000,12675,6000,12679,4000,12680,2000,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2256,'RUDO','Rudo','Rudo',135,501489,1,27266,24818,1,1401,1501,196,96,106,65,61,42,125,72,10,12,0,8,66,0x3795,120,1576,504,360,0,0,0,0,0,0,0,12623,10,617,6000,616,100,12675,100,12679,1000,12680,1000,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (2249,'PYURIEL','Pyuriel','Angry Student Pyuriel',141,2205000,1,3000246,2400000,2,2515,1513,388,206,196,131,125,276,401,156,10,12,1,7,83,0x37B5,100,1380,1380,360,750061,616,5000,617,5000,617,5000,12623,200,617,6000,616,1000,12675,6000,12679,4000,12680,2000,0,0,0,0,0,0,4578,1);
+REPLACE INTO `mob_db` VALUES (2250,'LORA','Lora','Warrior Laura',136,500255,1,33134,27576,2,1985,1701,224,58,144,92,86,69,149,68,10,12,0,7,43,0x3795,130,1600,432,360,0,0,0,0,0,0,0,12623,10,617,6000,616,100,12675,100,12679,1000,12680,1000,0,0,0,0,0,0,4579,1);
+REPLACE INTO `mob_db` VALUES (2251,'GIOIA','Gioia','Gioia',146,2507989,1,3006902,2607094,1,1105,2601,436,218,180,201,156,190,299,77,10,12,2,0,84,0x37B5,100,2000,2000,432,751725,616,5000,617,5000,617,5000,12623,200,617,6000,616,1000,12675,6000,12679,4000,12680,2000,0,0,0,0,0,0,4576,1);
+REPLACE INTO `mob_db` VALUES (2252,'ELVIRA','Elvira','Elvira',138,501765,1,35694,27138,3,699,2101,171,68,189,105,92,85,198,72,10,12,0,0,64,0x3795,120,1224,1224,360,0,0,0,0,0,0,0,12623,10,617,6000,616,100,12675,100,12679,1000,12680,1000,0,0,0,0,0,0,4577,1);
+REPLACE INTO `mob_db` VALUES (2253,'DAEHYON','Daehyon','General Daehyon',142,2500148,1,3003122,2548440,2,2710,1410,494,123,116,123,154,99,217,98,10,12,2,7,62,0x37B5,100,900,792,432,750780,616,5000,617,5000,617,5000,12623,200,617,6000,616,1000,12675,6000,12679,4000,12680,2000,0,0,0,0,0,0,4574,1);
+REPLACE INTO `mob_db` VALUES (2254,'SOHEON','Soheon','Samurai Soheon',137,502015,1,31430,25080,2,1591,1036,210,178,118,244,98,126,246,102,10,12,1,7,64,0x3795,120,1008,1008,432,0,0,0,0,0,0,0,12623,10,617,6000,616,100,12675,100,12679,1000,12680,1000,0,0,0,0,0,0,4575,1);
+REPLACE INTO `mob_db` VALUES (2255,'KADES','Kades','Dark Guardian Kades',143,2505000,1,3208000,2620000,1,2201,2001,479,262,191,223,187,155,362,163,10,12,2,0,67,0x37B5,100,900,648,480,802000,616,5000,617,5000,617,5000,12623,200,617,6000,616,1000,12675,6000,12679,4000,12680,2000,0,0,0,0,0,0,4580,1);
+REPLACE INTO `mob_db` VALUES (2256,'RUDO','Rudo','Rudo',135,501489,1,27266,24818,1,1401,1501,196,96,106,65,61,42,125,72,10,12,0,8,66,0x3795,120,1576,504,360,0,0,0,0,0,0,0,12623,10,617,6000,616,100,12675,100,12679,1000,12680,1000,0,0,0,0,0,0,4581,1);
REPLACE INTO `mob_db` VALUES (2257,'I_PIAMETTE','Piamette','Piamette',1,50,1,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x83,400,1872,672,480,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);
REPLACE INTO `mob_db` VALUES (2258,'I_PIAMETTE_','Piamette','Piamette',1,50,1,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x83,400,1872,672,480,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);
REPLACE INTO `mob_db` VALUES (2259,'I_GARDEN_KEEPER','Garden Keeper','Garden Keeper',1,50,1,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x83,400,1872,672,480,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);
@@ -1420,8 +1420,8 @@ REPLACE INTO `mob_db` VALUES (2471,'MG_KHALITZBURG','Khalitzburg','Khalitzburg',
REPLACE INTO `mob_db` VALUES (2472,'MG_BLOODY_KNIGHT','Bloody Knight','Bloody Knight',116,285000,1,7348,6511,3,942,1065,122,50,132,59,70,57,98,45,10,12,2,0,87,0x3695,250,828,528,192,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);
REPLACE INTO `mob_db` VALUES (2473,'MG_M_UNDEAD_KNIGHT','Undead Knight','Undead Knight',133,500000,1,4500,3375,2,751,880,122,62,122,87,54,65,103,65,14,16,2,7,80,0x37B5,170,398,384,288,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);
REPLACE INTO `mob_db` VALUES (2474,'MG_F_UNDEAD_KNIGHT','Undead Knight','Undead Knight',133,500000,1,4500,3375,2,751,880,122,62,122,87,54,65,103,65,14,16,2,7,80,0x37B5,170,398,384,288,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);
-REPLACE INTO `mob_db` VALUES (2475,'MG_CORRUPTION_ROOT','Root of Corruption','Root of Corruption',136,3190000,1,240120,187920,3,710,1762,213,123,86,89,120,131,101,92,14,14,2,7,62,0x1A4,170,2000,2000,480,120060,607,5500,608,3500,732,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
-REPLACE INTO `mob_db` VALUES (2476,'MG_AMDARAIS','Amdarias','Amdarias',143,3283990,1,74288,77950,2,8860,10022,32,66,140,159,30,109,300,90,10,12,2,2,63,0x37B5,200,1152,1152,576,37144,617,5500,617,5000,616,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db` VALUES (2475,'MG_CORRUPTION_ROOT','Root of Corruption','Root of Corruption',136,3190000,1,240120,187920,3,710,1762,213,123,86,89,120,131,101,92,14,14,2,7,62,0x1A4,170,2000,2000,480,120060,607,5500,608,3500,732,5500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4603,1);
+REPLACE INTO `mob_db` VALUES (2476,'MG_AMDARAIS','Amdarias','Amdarias',143,3283990,1,74288,77950,2,8860,10022,32,66,140,159,30,109,300,90,10,12,2,2,63,0x37B5,200,1152,1152,576,37144,617,5500,617,5000,616,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4601,1);
REPLACE INTO `mob_db` VALUES (2549,'GEFFEN_MAGE_1','Ahri','Ahri',90,100000,1,8900,4550,1,329,424,64,38,50,50,50,50,130,50,10,12,1,7,20,0x3695,200,676,648,432,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);
REPLACE INTO `mob_db` VALUES (2550,'GEFFEN_MAGE_2','Dio Anemos','Dio Anemos',95,200000,1,9440,4430,1,478,649,129,18,40,40,50,80,130,60,10,12,1,7,20,0x3695,200,676,648,432,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);
REPLACE INTO `mob_db` VALUES (2551,'GEFFEN_MAGE_3_1','Geffen Shoplifter','Geffen Shoplifter',100,300000,1,9780,3665,1,478,632,93,36,70,70,40,40,140,60,10,12,1,7,20,0x3695,200,676,648,432,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);
diff --git a/src/common/console.c b/src/common/console.c
index f0702d0da..10e1bee1a 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -90,6 +90,7 @@ void display_title(void) {
ShowInfo("CPU: '"CL_WHITE"%s [%d]"CL_RESET"'\n", sysinfo->cpu(), sysinfo->cpucores());
ShowInfo("Compiled with %s\n", sysinfo->compiler());
ShowInfo("Compile Flags: %s\n", sysinfo->cflags());
+ ShowInfo("Timer Function Type: %s\n", sysinfo->time());
}
/**
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index 7cc4cd16a..95f423ff7 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -38,6 +38,7 @@
#ifdef WIN32
# include <windows.h>
#else
+# include <sys/time.h> // time constants
# include <unistd.h>
#endif
@@ -1052,6 +1053,19 @@ void sysinfo_final(void) {
sysinfo->p->vcstype_name = NULL;
}
+static const char *sysinfo_time(void)
+{
+#if defined(WIN32)
+ return "ticks count";
+#elif defined(ENABLE_RDTSC)
+ return "rdtsc";
+#elif defined(HAVE_MONOTONIC_CLOCK)
+ return "monotonic clock";
+#else
+ return "time of day";
+#endif
+}
+
/**
* Interface default values initialization.
*/
@@ -1072,6 +1086,7 @@ void sysinfo_defaults(void) {
sysinfo->is64bit = sysinfo_is64bit;
sysinfo->compiler = sysinfo_compiler;
sysinfo->cflags = sysinfo_cflags;
+ sysinfo->time = sysinfo_time;
sysinfo->vcstype = sysinfo_vcstype;
sysinfo->vcstypeid = sysinfo_vcstypeid;
sysinfo->vcsrevision_src = sysinfo_vcsrevision_src;
diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h
index 904be832f..2a391bfa4 100644
--- a/src/common/sysinfo.h
+++ b/src/common/sysinfo.h
@@ -52,6 +52,7 @@ struct sysinfo_interface {
bool (*is64bit) (void);
const char *(*compiler) (void);
const char *(*cflags) (void);
+ const char *(*time) (void);
const char *(*vcstype) (void);
int (*vcstypeid) (void);
const char *(*vcsrevision_src) (void);
diff --git a/src/common/timer.c b/src/common/timer.c
index 7f71157ae..e7a57481a 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -25,6 +25,7 @@
#include "common/cbasetypes.h"
#include "common/db.h"
#include "common/memmgr.h"
+#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/utils.h"
@@ -87,6 +88,8 @@ struct timer_func_list {
int timer_add_func_list(TimerFunc func, char* name) {
struct timer_func_list* tfl;
+ nullpo_ret(func);
+ nullpo_ret(name);
if (name) {
for( tfl=tfl_root; tfl != NULL; tfl=tfl->next )
{// check suspicious cases
@@ -303,7 +306,19 @@ static int acquire_timer(void) {
int timer_add(int64 tick, TimerFunc func, int id, intptr_t data) {
int tid;
+ nullpo_retr(INVALID_TIMER, func);
+
tid = acquire_timer();
+ if (timer_data[tid].type != 0 && timer_data[tid].type != TIMER_REMOVE_HEAP)
+ {
+ ShowError("timer_add error: wrong tid type: %d, [%d]%p(%s) -> %p(%s)\n", timer_data[tid].type, tid, func, search_timer_func_list(func), timer_data[tid].func, search_timer_func_list(timer_data[tid].func));
+ Assert_retr(INVALID_TIMER, 0);
+ }
+ if (timer_data[tid].func != NULL)
+ {
+ ShowError("timer_add error: func non NULL: [%d]%p(%s) -> %p(%s)\n", tid, func, search_timer_func_list(func), timer_data[tid].func, search_timer_func_list(timer_data[tid].func));
+ Assert_retr(INVALID_TIMER, 0);
+ }
timer_data[tid].tick = tick;
timer_data[tid].func = func;
timer_data[tid].id = id;
@@ -317,9 +332,11 @@ int timer_add(int64 tick, TimerFunc func, int id, intptr_t data) {
/// Starts a new timer that automatically restarts itself (infinite loop until manually removed).
/// Returns the timer's id, or INVALID_TIMER if it fails.
-int timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) {
+int timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval)
+{
int tid;
+ nullpo_retr(INVALID_TIMER, func);
if (interval < 1) {
ShowError("timer_add_interval: invalid interval (tick=%"PRId64" %p[%s] id=%d data=%"PRIdPTR" diff_tick=%"PRId64")\n",
tick, func, search_timer_func_list(func), id, data, DIFF_TICK(tick, timer->gettick()));
@@ -327,6 +344,18 @@ int timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int in
}
tid = acquire_timer();
+ if (timer_data[tid].type != 0 && timer_data[tid].type != TIMER_REMOVE_HEAP)
+ {
+ ShowError("timer_add_interval: wrong tid type: %d, [%d]%p(%s) -> %p(%s)\n", timer_data[tid].type, tid, func, search_timer_func_list(func), timer_data[tid].func, search_timer_func_list(timer_data[tid].func));
+ Assert_retr(INVALID_TIMER, 0);
+ return INVALID_TIMER;
+ }
+ if (timer_data[tid].func != NULL)
+ {
+ ShowError("timer_add_interval: func non NULL: [%d]%p(%s) -> %p(%s)\n", tid, func, search_timer_func_list(func), timer_data[tid].func, search_timer_func_list(timer_data[tid].func));
+ Assert_retr(INVALID_TIMER, 0);
+ return INVALID_TIMER;
+ }
timer_data[tid].tick = tick;
timer_data[tid].func = func;
timer_data[tid].id = id;
@@ -346,16 +375,28 @@ const struct TimerData* timer_get(int tid) {
/// Marks a timer specified by 'id' for immediate deletion once it expires.
/// Param 'func' is used for debug/verification purposes.
/// Returns 0 on success, < 0 on failure.
-int timer_do_delete(int tid, TimerFunc func) {
+int timer_do_delete(int tid, TimerFunc func)
+{
+ nullpo_ret(func);
+
if( tid < 0 || tid >= timer_data_num ) {
- ShowError("timer_do_delete error : no such timer %d (%p(%s))\n", tid, func, search_timer_func_list(func));
+ ShowError("timer_do_delete error : no such timer [%d](%p(%s))\n", tid, func, search_timer_func_list(func));
+ Assert_retr(-1, 0);
return -1;
}
if( timer_data[tid].func != func ) {
- ShowError("timer_do_delete error : function mismatch %p(%s) != %p(%s)\n", timer_data[tid].func, search_timer_func_list(timer_data[tid].func), func, search_timer_func_list(func));
+ ShowError("timer_do_delete error : function mismatch [%d]%p(%s) != %p(%s)\n", tid, timer_data[tid].func, search_timer_func_list(timer_data[tid].func), func, search_timer_func_list(func));
+ Assert_retr(-2, 0);
return -2;
}
+ if (timer_data[tid].type == 0 || timer_data[tid].type == TIMER_REMOVE_HEAP)
+ {
+ ShowError("timer_do_delete: timer already deleted: %d, [%d]%p(%s) -> %p(%s)\n", timer_data[tid].type, tid, func, search_timer_func_list(func), func, search_timer_func_list(func));
+ Assert_retr(-3, 0);
+ return -3;
+ }
+
timer_data[tid].func = NULL;
timer_data[tid].type = TIMER_ONCE_AUTODEL;
@@ -383,7 +424,19 @@ int64 timer_settick(int tid, int64 tick)
// search timer position
ARR_FIND(0, BHEAP_LENGTH(timer_heap), i, BHEAP_DATA(timer_heap)[i] == tid);
if (i == BHEAP_LENGTH(timer_heap)) {
- ShowError("timer_settick: no such timer %d (%p(%s))\n", tid, timer_data[tid].func, search_timer_func_list(timer_data[tid].func));
+ ShowError("timer_settick: no such timer [%d](%p(%s))\n", tid, timer_data[tid].func, search_timer_func_list(timer_data[tid].func));
+ Assert_retr(-1, 0);
+ return -1;
+ }
+
+ if (timer_data[tid].type == 0 || timer_data[tid].type == TIMER_REMOVE_HEAP) {
+ ShowError("timer_settick error: set tick for deleted timer %d, [%d](%p(%s))\n", timer_data[tid].type, tid, timer_data[tid].func, search_timer_func_list(timer_data[tid].func));
+ Assert_retr(-1, 0);
+ return -1;
+ }
+ if (timer_data[tid].func == NULL) {
+ ShowError("timer_settick error: set tick for timer with wrong func [%d](%p(%s))\n", tid, timer_data[tid].func, search_timer_func_list(timer_data[tid].func));
+ Assert_retr(-1, 0);
return -1;
}
@@ -438,6 +491,7 @@ int do_timer(int64 tick)
default:
case TIMER_ONCE_AUTODEL:
timer_data[tid].type = 0;
+ timer_data[tid].func = NULL;
if (free_timer_list_pos >= free_timer_list_max) {
free_timer_list_max += 256;
RECREATE(free_timer_list,int,free_timer_list_max);
diff --git a/src/map/skill.c b/src/map/skill.c
index be899d0dc..c70b94cd5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11777,6 +11777,10 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick
sc_start4(ss,bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit);
break;
case UNT_APPLEIDUN:
+ // If Aegis, apple of idun doesn't update its effect
+ if (!battle_config.song_timer_reset && sc && sce)
+ return 0;
+ // Let it fall through
case UNT_WHISTLE:
case UNT_ASSASSINCROSS:
case UNT_POEMBRAGI:
@@ -11784,19 +11788,34 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick
case UNT_DONTFORGETME:
case UNT_FORTUNEKISS:
case UNT_SERVICEFORYOU:
+ // Don't buff themselves without link!
if (sg->src_id==bl->id && !(sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_BARDDANCER))
return 0;
if (!sc) return 0;
if (!sce)
sc_start4(ss,bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit);
+ // From here songs are already active
else if (battle_config.song_timer_reset && sce->val4 == 1) {
- //Readjust timers since the effect will not last long.
+ // eA style:
+ // Readjust timers since the effect will not last long.
sce->val4 = 0;
timer->delete(sce->timer, status->change_timer);
sce->timer = timer->add(tick+sg->limit, status->change_timer, bl->id, type);
+ } else if (!battle_config.song_timer_reset) {
+ // Aegis style:
+ // Songs won't renew unless finished
+ const struct TimerData *td = timer->get(sce->timer);
+ if (DIFF_TICK32(td->tick, timer->gettick()) < sg->interval) {
+ // Update with new values as the current one will vanish soon
+ timer->delete(sce->timer, status->change_timer);
+ sce->timer = timer->add(tick+sg->limit, status->change_timer, bl->id, type);
+ sce->val1 = sg->skill_lv; // Why are we storing skill_lv as val1?
+ sce->val2 = sg->val1;
+ sce->val3 = sg->val2;
+ sce->val4 = 0;
+ }
}
-
break;
case UNT_FOGWALL:
@@ -12201,18 +12220,25 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
if (md && md->class_ == MOBID_EMPELIUM)
break;
#endif
- if ((sg->src_id == bl->id && !(tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_BARDDANCER))
- || (!(battle_config.song_timer_reset) && tsc && tsc->data[type] && tsc->data[type]->val4 == 1))
+ // Don't buff themselves!
+ if ((sg->src_id == bl->id && !(tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_BARDDANCER)))
break;
- heal = skill->calc_heal(ss,bl,sg->skill_id, sg->skill_lv, true);
- if( tsc && tsc->data[SC_AKAITSUKI] && heal )
- heal = ~heal + 1;
- clif->skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
- status->heal(bl, heal, 0, 0);
-
- if (!battle_config.song_timer_reset)
+ // Aegis style
+ // Check if the remaining time is enough to survive the next update
+ if (!battle_config.song_timer_reset
+ && !(tsc && tsc->data[type] && tsc->data[type]->val4 == 1)) {
+ // Apple of Idun is not active. Start it now
sc_start4(ss, bl, type, 100, sg->skill_lv, sg->val1, sg->val2, 0, sg->limit);
+ }
+
+ if (tstatus->hp < tstatus->max_hp) {
+ heal = skill->calc_heal(ss,bl,sg->skill_id, sg->skill_lv, true);
+ if( tsc && tsc->data[SC_AKAITSUKI] && heal )
+ heal = ~heal + 1;
+ clif->skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
+ status->heal(bl, heal, 0, 0);
+ }
}
break;
case UNT_POEMBRAGI:
@@ -12222,12 +12248,30 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
case UNT_DONTFORGETME:
case UNT_FORTUNEKISS:
case UNT_SERVICEFORYOU:
- if (battle_config.song_timer_reset
- || (!(battle_config.song_timer_reset) && tsc && tsc->data[type] && tsc->data[type]->val4 == 1)
- || (sg->src_id == bl->id && !(tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_BARDDANCER))
- )
+ // eA style: doesn't need this
+ if (battle_config.song_timer_reset)
+ break;
+ // Don't let buff themselves!
+ if (sg->src_id == bl->id && !(tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_BARDDANCER))
break;
+ // Aegis style
+ // Check if song has enough time to survive the next check
+ if (!(battle_config.song_timer_reset) && tsc && tsc->data[type] && tsc->data[type]->val4 == 1) {
+ const struct TimerData *td = timer->get(tsc->data[type]->timer);
+ if (DIFF_TICK32(td->tick, timer->gettick()) < sg->interval) {
+ // Update with new values as the current one will vanish
+ timer->delete(tsc->data[type]->timer, status->change_timer);
+ tsc->data[type]->timer = timer->add(tick+sg->limit, status->change_timer, bl->id, type);
+ tsc->data[type]->val1 = sg->skill_lv;
+ tsc->data[type]->val2 = sg->val1;
+ tsc->data[type]->val3 = sg->val2;
+ tsc->data[type]->val4 = 0;
+ }
+ break; // Had enough time or not, it now has. Exit
+ }
+
+ // Song was not active. Start it now
sc_start4(ss, bl, type, 100, sg->skill_lv, sg->val1, sg->val2, 0, sg->limit);
break;
case UNT_TATAMIGAESHI:
@@ -12749,8 +12793,9 @@ int skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) {
case DC_DONTFORGETME:
case DC_FORTUNEKISS:
case DC_SERVICEFORYOU:
- if ((battle_config.song_timer_reset && sce) // athena style
- || (!battle_config.song_timer_reset && sce && sce->val4 != 1)
+
+ if ((battle_config.song_timer_reset && sce) // eAthena style: update everytime
+ || (!battle_config.song_timer_reset && sce && sce->val4 != 1) // Aegis style: update only when it was not a reduced effect
) {
timer->delete(sce->timer, status->change_timer);
//NOTE: It'd be nice if we could get the skill_lv for a more accurate extra time, but alas...
diff --git a/src/map/status.c b/src/map/status.c
index 879f10efb..26db1750b 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3523,10 +3523,14 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str
if (regen->sregen)
regen->sregen->rate.hp += 3;
}
+
if (sc->data[SC_MAGNIFICAT]) {
+#ifndef RENEWAL // HP Regen applies only in Pre-renewal
regen->rate.hp += 1;
+#endif
regen->rate.sp += 1;
}
+
if (sc->data[SC_GDSKILL_REGENERATION]) {
const struct status_change_entry *sce = sc->data[SC_GDSKILL_REGENERATION];
if (!sce->val4) {