Example #1
0
 public function generateRollURL($diffDie)
 {
     $difficultyCollection = new DiceCollection();
     $difficultyCollection->createPoolFromSerializedDiceAmount($diffDie);
     $roll = new RollTable();
     if (count($difficultyCollection->getDiceArray()) > 0) {
         // Difficutly Set
         $roll->setAgainstDiceSerial($difficultyCollection->getDiceAmountSerialized());
         $roll->setAgainstIncluded(RollTable::Yes);
     }
     $roll->setGenDate(time());
     $roll->save();
     $this->renderArray['RollURL'] = "http://reztek.net/rr/roll/" . $roll->getId();
 }
Example #2
0
 public function generateRoll($diffDie)
 {
     $difficultyCollection = new DiceCollection();
     $difficultyCollection->createPoolFromSerializedDiceAmount($diffDie);
     $roll = new RollTable();
     if (count($difficultyCollection->getDiceArray()) > 0) {
         // Difficutly Set
         $roll->setAgainstDiceSerial($difficultyCollection->getDiceAmountSerialized());
         $roll->setAgainstIncluded(RollTable::Yes);
     }
     $roll->setGenDate(time());
     $roll->save();
     return $roll->getId();
 }