From aa7353fa31499f953df9b87947f4049c480e8264 Mon Sep 17 00:00:00 2001 From: hecht Date: Sat, 26 Nov 2011 15:52:24 +0000 Subject: [PATCH] The fights didn't display the "right" winner due the check "is charname like this char-id" can never be true! --- ag/event_abholen.php | 4 +++- ag/include/event.inc.php | 2 -- ag/include/kampf_anzeige.inc.php | 2 +- ag/include/kampf_wrapper.inc.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ag/event_abholen.php b/ag/event_abholen.php index 464247c..1e663d4 100644 --- a/ag/event_abholen.php +++ b/ag/event_abholen.php @@ -15,7 +15,9 @@ include_once (ROOT_PATH . '/include/parse.inc.php'); function fetchProcessing($user, $char) { $char_id = $char['id']; $event_ids = getEventIdsToFetch($char_id); - + if(count($event_ids) == 0) { + return 'Es gibt nix zum Abholen!
'; + } foreach ($event_ids as $event_id) { $fight_ids = abholenChar($user, $event_id, $char_id); if(!is_array($fight_ids)) { diff --git a/ag/include/event.inc.php b/ag/include/event.inc.php index f5d6a40..cf00f11 100644 --- a/ag/include/event.inc.php +++ b/ag/include/event.inc.php @@ -333,8 +333,6 @@ function getEventFightRoundData($event_id, $event_fight_id, $round) { $result[$row['event_char_id']] = $row; } return $result; - - } diff --git a/ag/include/kampf_anzeige.inc.php b/ag/include/kampf_anzeige.inc.php index 33860d5..ce9d8aa 100644 --- a/ag/include/kampf_anzeige.inc.php +++ b/ag/include/kampf_anzeige.inc.php @@ -418,7 +418,7 @@ function displayEventFight($event_id, $event_fight_id) { } if($event_fight_data['passed'] == 1) { - displaySummary($char1['char_name'], $char2['char_name'], $event_fight_data['winner']==$char1['char_name']?$char1['char_name']:$char2['char_name'], $event_fight_metadata[KEY_EXP_CHAR1], $event_fight_metadata[KEY_EXP_CHAR2], $event_fight_metadata[KEY_GELD_CHAR1], $event_fight_metadata[KEY_GELD_CHAR2], $event_fight_metadata[KEY_AXP_CHAR1], $event_fight_metadata[KEY_AXP_CHAR2], $event_fight_metadata[KEY_LOGE], $event_fight_metadata[KEY_SITZ], $event_fight_metadata[KEY_STEH]); + displaySummary($char1['char_name'], $char2['char_name'], $event_fight_data['winner']==$char1['event_char_id']?$char1['char_name']:$char2['char_name'], $event_fight_metadata[KEY_EXP_CHAR1], $event_fight_metadata[KEY_EXP_CHAR2], $event_fight_metadata[KEY_GELD_CHAR1], $event_fight_metadata[KEY_GELD_CHAR2], $event_fight_metadata[KEY_AXP_CHAR1], $event_fight_metadata[KEY_AXP_CHAR2], $event_fight_metadata[KEY_LOGE], $event_fight_metadata[KEY_SITZ], $event_fight_metadata[KEY_STEH]); } else { displayFightIsOngoing($char1['char_name'], $char2['char_name']); } diff --git a/ag/include/kampf_wrapper.inc.php b/ag/include/kampf_wrapper.inc.php index 7d50fca..0d89974 100644 --- a/ag/include/kampf_wrapper.inc.php +++ b/ag/include/kampf_wrapper.inc.php @@ -209,8 +209,8 @@ function calculateFight(array $char1, array $char2) { $chara_2['hp'] = $k_hp[1]; $chara_2['hp_max'] = $k_hp2[1]; - $chara_2['mp'] = $k_hp[1]; - $chara_2['mp_max'] = $k_hp2[1]; + $chara_2['mp'] = $k_mp[1]; + $chara_2['mp_max'] = $k_mp2[1]; $runde['char1_array'] = $chara_1; $runde['char2_array'] = $chara_2;