Exemplo n.º 1
0
    unset($_SESSION['notEnoughStamina']);
}
if (isset($_SESSION['won']) && $firstBattle == '') {
    if ($_SESSION['won'] == 'true') {
        //echo "Congratulations! You won! <br>";
        //echo "You gained " . $_SESSION['expGained'] . " experience! <br>";
        $_SESSION['play_attack_sound'] = SOUND_ATTACK;
        $result_html .= '<div id="notification">
		<div class="notificationbox successbox">
			<p><span class="won">You won the fight,</span>
			taking <strong>' . $looserDemage . ' damage</strong> while dealing <strong>' . $winnerDemage . ' damage</strong> to <a onclick="playSound(' . SOUND_CLICK . ')"  href="' . $serverRoot . 'externalplayerprofile.php?userID=' . $_SESSION['otherUserID'] . '" class="profile">' . $otherUser->getName() . '</a>.</p>
			 <p>You took <span class="cash">$' . $cashLost . '</span>, and gained <strong>' . $_SESSION['expGained'] . '</strong> experience points.</p>
			 ';
        if (isset($_SESSION['bounty'])) {
            //$user->updateUserCash($_SESSION['bountyAmount']);
            $update = Bounty::disableBountyAfterUser($_SESSION['otherUserID']);
        } else {
        }
    } else {
        $_SESSION['play_attack_sound'] = SOUND_ATTACK;
        $result_html .= ' <div id="notification">
		<div class="notificationbox notifybox">
		<p><span class="lost">You lost the fight,</span> taking <strong>' . $winnerDemage . ' damage</strong> while dealing <strong>' . $looserDemage . ' damage</strong> to  <a onclick="playSound(' . SOUND_CLICK . ')"  href="' . $serverRoot . 'externalplayerprofile.php?userID=' . $_SESSION['otherUserID'] . '" class="profile">' . $otherUser->getName() . '</a>.</p>
		<!--<p>You loose <span class="cash">$' . $cashLost . ' cash</span>, and gained <strong>0</strong> experience points.</p>-->';
    }
    unset($_SESSION['won']);
}
if ($firstBattle) {
    $_SESSION['play_attack_sound'] = SOUND_ATTACK;
    /* $result_html .= '<div id="notification">
       <div class="successmission">