From 1af670a9148c5d8f1fdb80079bd4149f14670283 Mon Sep 17 00:00:00 2001 From: radiskull Date: Wed, 30 Nov 2011 19:40:48 +0000 Subject: [PATCH] #61 gefixt --- ag/include/schatz.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ag/include/schatz.inc.php b/ag/include/schatz.inc.php index 9b4fb62..7a464c8 100644 --- a/ag/include/schatz.inc.php +++ b/ag/include/schatz.inc.php @@ -292,6 +292,14 @@ function submitCharChanges($charid, $items, $exp, $geld, $ort, $hp, $mp, $attack $mp[1] = $tmp[1]; $hp[0] = max($hp[0], 0); $mp[0] = max($mp[0], 0); + //aktuelle HP/MP sollten die max. HP/MP nicht überschreiten + if($hp[0] > $hp[1]) { + $hp[0] = $hp[1]; + } + + if($mp[0] > $mp[1]) { + $mp[0] = $mp[1]; + } // Erstmal aufräumen mysql_query('Delete from quests where charid = '.$charid); mysql_query('Delete from quest_fights where charid = '.$charid);