function warscore_levelup($socket, WC_Warbox $box, GWF_User $user, $level) { if ($box->isMultisolve()) { $changed = warscore_levelup_multi($socket, $box, $user, $level); } else { $changed = warscore_levelup_single($socket, $box, $user, $level); } if ($changed) { $box->recalcPlayersAndScore(); if ($box->doesRecycleTokens()) { WC_WarToken::deleteWarToken($user); } warscore_update($socket, $box, $user, $level); } else { warscore_nochange($socket, $box, $user, $level); } }