added the "interfaces" for the clan fights

main
hecht 13 years ago
parent bc99599f64
commit f30196b6cb

@ -380,5 +380,14 @@ function getAttacksforChar($charid, $mode = 0) {
return $overview;
}
/**
* This function reads out the attack set of the char
* @param string $name
* @param int $char_id
*/
function getAttackenSet($name, $char_id) {
// TODO: Further implementation
return NULL;
}
?>

@ -78,4 +78,33 @@ function inviteUser(array $user, $userid, array $clan = NULL){
}
}
function challengeClan(array $user, array $charids, $clanid, $validTime = 24) {
if($clan === NULL) {
$qry = mysql_query('Select * from clan where id = ' . $user['clan']);
$clan = mysql_fetch_assoc($qry);
}
if($clan['leader'] != $user['id'] && $clan['co_leader'] != $user['id']){
return 'Nur der Leader, bzw. der Co-Leader kann andere Clans herausfordern!!';
}
// TODO: Further implementation
return NULL;
}
function acceptChallenge(array $user, array $charids) {
if($clan === NULL) {
$qry = mysql_query('Select * from clan where id = ' . $user['clan']);
$clan = mysql_fetch_assoc($qry);
}
if($clan['leader'] != $user['id'] && $clan['co_leader'] != $user['id']){
return 'Nur der Leader, bzw. der Co-Leader kann herausforderungen anderer Clans annehmen!!';
}
// TODO: Further implementation
return NULL;
}
?>
Loading…
Cancel
Save