コード例 #1
0
 protected function actions(array $actions, QuestEvent $e)
 {
     for ($i = 0; $i < count($actions); $i++) {
         $method = $actions[$i][0];
         $argument = $actions[$i][1];
         if (method_exists($e->getPlayerHelper(), $method)) {
             if (!is_null($argument)) {
                 $e->getPlayerHelper()->{$method}($argument);
             } else {
                 $e->getPlayerHelper()->{$method}();
             }
         }
     }
 }