adjusted the calculation of the clan_fight cronjob

main
hecht 13 years ago
parent 64446d74f8
commit 82f52c5268

@ -1034,7 +1034,7 @@ function isAuthorizedClanfightCoordinator($clan_id, $user_id, $clan_fight_id = N
* @param int $winner the id of the clan that has won * @param int $winner the id of the clan that has won
*/ */
function calculateClanExperience(array $clan1, array $clan2, $winner) { function calculateClanExperience(array $clan1, array $clan2, $winner) {
$m = 1+pow(($clan2['level'] - $clan1['level'])/20,10); $m = 1+pow(10, ($clan2['level'] - $clan1['level'])/20);
$g = CLAN_EXP_FAKTOR_G; $g = CLAN_EXP_FAKTOR_G;
if($clan1['id'] == $winner) { if($clan1['id'] == $winner) {
$exp = (($clan1['level'] + $clan2['level'])/2)*$m*$g; $exp = (($clan1['level'] + $clan2['level'])/2)*$m*$g;

Loading…
Cancel
Save