radiskull 13 years ago
parent da71cd39b0
commit 1af670a914

@ -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);

Loading…
Cancel
Save