save steps and point info to db
This commit is contained in:
@@ -115,6 +115,7 @@ class MineseekerTopic implements TopicInterface
|
||||
|
||||
/**
|
||||
* Like RPC is will use to prefix the channel
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
@@ -123,6 +124,8 @@ class MineseekerTopic implements TopicInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Save steps and point information to database
|
||||
*
|
||||
* @param $topic
|
||||
* @param $event
|
||||
*/
|
||||
@@ -140,12 +143,18 @@ class MineseekerTopic implements TopicInterface
|
||||
$step->setCol($event['coords'][1]);
|
||||
$step->setWBomb($event['bomb']);
|
||||
$step->setPlayedGame($playedGame);
|
||||
|
||||
$this->em->persist($step);
|
||||
|
||||
$playedGame->setBluePoints($event['bluePoints']);
|
||||
$playedGame->setRedPoints($event['redPoints']);
|
||||
$this->em->persist($playedGame);
|
||||
|
||||
$this->em->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save user data to database
|
||||
*
|
||||
* @param $topic
|
||||
* @param $userName
|
||||
* @param $user
|
||||
|
||||
Reference in New Issue
Block a user