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:
Sarjuuk
2023-05-20 03:18:36 +02:00
parent fc7a526a67
commit 77f81c1bde
20 changed files with 1143 additions and 914 deletions

View File

@@ -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;