fixed multiple database queries

This commit is contained in:
lopar
2018-03-03 02:07:27 +02:00
parent af1b3ec361
commit 3c129870fe
2 changed files with 14 additions and 4 deletions
+5
View File
@@ -10,6 +10,11 @@ class nick
private $invis;
private $user_data;
/**
* nick constructor.
* @param $playerId
* @param int $showInvisibility
*/
public function __construct($playerId, $showInvisibility = 1) {
if (!$this->user_data) {
$user = db::c()->query('SELECT `login`, `level`, `hp`, `align`, `klan`, `hp`, `maxhp` FROM `users` WHERE `id` = ?i',$playerId)->fetch_assoc();