X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=trust_path%2Fmodules%2Fsd3rd%2Fclass%2Fhandler%2FSkill.class.php;fp=trust_path%2Fmodules%2Fsd3rd%2Fclass%2Fhandler%2FSkill.class.php;h=8d06006fe9f09b1efb437ffc97a7fba0464e53e4;hb=f4be23960f2e1dd364c991dbecbee1511870f61f;hp=7ab87ff0e5360464bc6914284475f5b22d8ed626;hpb=915c9618dd910a6bd9b94e83b4bf14b30bbe4625;p=mulab%2Fsd3rd.git diff --git a/trust_path/modules/sd3rd/class/handler/Skill.class.php b/trust_path/modules/sd3rd/class/handler/Skill.class.php index 7ab87ff..8d06006 100644 --- a/trust_path/modules/sd3rd/class/handler/Skill.class.php +++ b/trust_path/modules/sd3rd/class/handler/Skill.class.php @@ -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); + } } /**