This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/scripts/game/beta5/prot/library/isPlayerMarked.inc

32 lines
811 B
PHP

<?php
//-----------------------------------------------------------------------
// LegacyWorlds Beta 5
// Game libraries
//
// beta5/prot/library/isPlayerMarked.inc
//
// This function checks whether a player is marked for destruction by
// the Peacekeepers on a specific planet.
//
// Copyright(C) 2004-2008, DeepClone Development
//-----------------------------------------------------------------------
class beta5_prot_isPlayerMarked {
public function __construct($lib) {
$this->lib = $lib;
$this->db = $this->lib->game->db;
}
public function run($playerID, $planetID) {
$q = $this->db->query(
"SELECT p.id FROM planet p, pk_sys_status s "
. "WHERE p.id = $planetID AND s.system = p.system "
. "AND s.status = 'O' AND s.player = $playerID"
);
return dbCount($q) == 1;
}
}
?>