OSDN Git Service

#17692 - Append skill list.
[mulab/sd3rd.git] / trust_path / modules / sd3rd / class / handler / Skill.class.php
index 7ab87ff..8d06006 100644 (file)
@@ -35,6 +35,20 @@ class Sd3rd_SkillObject extends XoopsSimpleObject
         $this->initVar('tp', XOBJ_DTYPE_INT, '', false);
         $this->initVar('register_time', XOBJ_DTYPE_INT, '', false);
     }
+    
+    /**
+     * Get formated range value.
+     * 
+     * @param   void
+     * 
+     * @return  string
+    **/
+    public function getRange()
+    {
+        static $map = array(-10 => '-',0 => _MD_SD3RD_LANG_WEAPON);
+        $range = $this->get('range');
+        return isset($map[$range]) ? $map[$range] : sprintf('%1.1f',$range * 0.1);
+    }
 }
 
 /**