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(); }
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(); }