mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup/Sources
* rewrote SetupSrcipt * implemented 'zone' parameter * implemented 'bossdrop' parameter * implemented 'dungeondifficulty' parameter * implemented item filter relying on zone information (dropsInX) * fixed world random drops showing a single loot source * extended Source column of spells to the same functionality as items ToDo: * apply new 'commondrop' parameter on loot listviews * gather difficuly versions of gameobjects and apply the same logic as for creatures * implement fake spawns so npcs can get linked to a zone
This commit is contained in:
@@ -423,6 +423,37 @@ abstract class CLI
|
||||
}
|
||||
|
||||
|
||||
class Timer
|
||||
{
|
||||
private $t_cur = 0;
|
||||
private $t_new = 0;
|
||||
private $intv = 0;
|
||||
|
||||
public function __construct(int $intervall)
|
||||
{
|
||||
$this->intv = $intervall / 1000; // in msec
|
||||
$this->t_cur = microtime(true);
|
||||
}
|
||||
|
||||
public function update() : bool
|
||||
{
|
||||
$this->t_new = microtime(true);
|
||||
if ($this->t_new > $this->t_cur + $this->intv)
|
||||
{
|
||||
$this->t_cur = $this->t_cur + $this->intv;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function reset() : void
|
||||
{
|
||||
$this->t_cur = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
abstract class Util
|
||||
{
|
||||
const FILE_ACCESS = 0777;
|
||||
|
||||
Reference in New Issue
Block a user