Ejemplo n.º 1
0
/** This function sends a message, that a bidding got a cave
 *
 *  @param receiverID  the receiver's playerID
 *  @param caveID      the transfered cave's data
 *
 *  @return true if succes, false otherwise
 */
function takeover_send_transfer($receiverID, $cave)
{
    $xml = new SimpleXMLElement(_MSG_XML);
    $xml->addChild('success', 'true');
    $xml->addChild('successType', 'winCave');
    $xml->addChild('target');
    $xml->target->addChild('caveName', $cave['name']);
    $xml->target->addChild('xCoord', $cave['xCoord']);
    $xml->target->addChild('yCoord', $cave['yCoord']);
    $msgXML = $xml->asXML();
    return takeover_system_message($receiverID, _MSG_SUBJECT_CAVETRANSFER, "xml Nachricht", $msgXML);
}
Ejemplo n.º 2
0
/** This function sends a message, that a bidding got a cave
 *
 *  @param receiverID  the receiver's playerID
 *  @param caveID      the transfered cave's data
 *
 *  @return true if succes, false otherwise
 */
function takeover_send_transfer($receiverID, $cave)
{
    $template = tmpl_load(_MSG_CAVETRANSFER);
    tmpl_set($template, $cave);
    return takeover_system_message($receiverID, _MSG_SUBJECT_CAVETRANSFER, tmpl_parse($template));
}