summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-SVN.txt2
-rw-r--r--src/map/pc.c5
-rw-r--r--src/map/status.c4
3 files changed, 11 insertions, 0 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt
index 47f069352..fb21c3ded 100644
--- a/Changelog-SVN.txt
+++ b/Changelog-SVN.txt
@@ -1,6 +1,8 @@
Date Added
03/09
+ * Added HP and SP rate underflow checking [celest]
+ * Added stop auto attacking if no arrows were equipped [celest]
* Added new script command: 'cardscnt'. It returns N of inserted cards in the same weapon. [Lupus]
Now I can start fixing CARDS COMBO exploits. And it's possible to fix old cards power abuse, too.
e.g. Assassins can equip 2 4-slot weapons and have HUGE card bonuses.
diff --git a/src/map/pc.c b/src/map/pc.c
index 866ef969c..70b6449fc 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3694,6 +3694,11 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data)
}
}
+ if(sd->status.weapon == 11 && sd->equip_index[10] < 0) {
+ clif_arrow_fail(sd,0);
+ return 0;
+ }
+
dist = distance(sd->bl.x,sd->bl.y,bl->x,bl->y);
range = sd->attackrange;
if(sd->status.weapon != 11) range++;
diff --git a/src/map/status.c b/src/map/status.c
index de2efce5a..a1826265f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -943,6 +943,8 @@ int status_calc_pc(struct map_session_data* sd,int first)
else if (s_class.upper==2)
sd->status.max_hp = sd->status.max_hp * 70/100;
+ if (sd->hprate <= 0)
+ sd->hprate = 1;
if(sd->hprate!=100)
sd->status.max_hp = sd->status.max_hp*sd->hprate/100;
@@ -968,6 +970,8 @@ int status_calc_pc(struct map_session_data* sd,int first)
sd->status.max_sp = sd->status.max_sp * 130/100;
else if (s_class.upper==2)
sd->status.max_sp = sd->status.max_sp * 70/100;
+ if (sd->sprate <= 0)
+ sd->sprate = 1;
if(sd->sprate!=100)
sd->status.max_sp = sd->status.max_sp*sd->sprate/100;