From 7d435ff6433ef1fb2295ee79ed043ee10dc725e9 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 24 May 2025 11:54:00 +0200 Subject: [PATCH] Add getNPCsCount --- system/libs/pot/OTS_InfoRespond.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/libs/pot/OTS_InfoRespond.php b/system/libs/pot/OTS_InfoRespond.php index baea69e0..3b345497 100644 --- a/system/libs/pot/OTS_InfoRespond.php +++ b/system/libs/pot/OTS_InfoRespond.php @@ -219,11 +219,16 @@ class OTS_InfoRespond extends DOMDocument * @return int Count of monsters. * @throws DOMException On DOM operation error. */ - public function getMonstersCount() + public function getMonstersCount(): int { return (int) $this->documentElement->getElementsByTagName('monsters')->item(0)->getAttribute('total'); } + public function getNPCsCount(): int + { + return (int) $this->documentElement->getElementsByTagName('npcs')->item(0)->getAttribute('total'); + } + /** * Returns map name. *