From cffd2c46efe5875ad1eb86a566a9b41bdb461861 Mon Sep 17 00:00:00 2001
From: Fibinger Ádám <adam.fibinger@wup.hu>
Date: Thu, 09 Jan 2020 16:31:43 +0100
Subject: [PATCH] Kali, Wamai és egyéb módosítások

---
 EOG/Models/Stripe.php |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/EOG/Models/Stripe.php b/EOG/Models/Stripe.php
index 1531e3f..2a84d3a 100644
--- a/EOG/Models/Stripe.php
+++ b/EOG/Models/Stripe.php
@@ -15,7 +15,7 @@
 		'glaz', 'goyo', 'gridlock', 'hibana', 'iq', 'jackal', 'jager', 'kaid', 'kapkan',
 		'lesion', 'lion', 'maestro', 'maverick', 'mira', 'montagne', 'mozzie', 'mute', 'nokk',
 		'nomad', 'pulse', 'rook', 'sledge', 'smoke', 'tachanka', 'thatcher', 'thermite', 'twitch',
-		'valkyrie', 'vigil', 'warden', 'ying', 'zofia'];
+		'valkyrie', 'vigil', 'warden', 'ying', 'zofia', 'wamai', 'kali'];
 	protected $state = [
 		'stripe' => [
 			'class' => 'team',
@@ -134,9 +134,11 @@
 			$this->setClass($state['stripe']["class"]);
 		}
 
-		if (!empty($state['cup']['name']) && !empty($state['cup']['number']))
+		if (!empty($state['cup']['name']) || !empty($state['cup']['number']))
 		{
-			$this->setCup($state['cup']['number'], $state['cup']['name']);
+			$cupNum = $state['cup']['number'] ?? '';
+			$cupName = $state['cup']['name'] ?? '';
+			$this->setCup($cupNum, $cupName);
 		}
 
 		if (!empty($state['team']))
@@ -173,4 +175,14 @@
 	{
 		return $this->state;
 	}
+
+	public function getType()
+	{
+		if (empty($this->state['stripe']['class']))
+		{
+			return null;
+		}
+
+		return $this->state['stripe']['class'];
+	}
 }
\ No newline at end of file

--
Gitblit v1.8.0