Файл: include/thing.php
Строк: 81
<?php
include_once("base.php");
/**
thing class
*/
class CThing extends CBase
{
/**
Constructor
*/
function CThing($database,$vnum = 0)
{
$this->db=$database;
$this->table_name=$GLOBALS['table_objects'];
$this->vnum=$vnum;
}
/**
Get name thing
*/
function getName()
{
return $this->getProperty("name");
}
/**
Get description thing
*/
function getDesc()
{
return $this->getProperty("description");
}
/**
Get cost thing
*/
function getCost()
{
return $this->getProperty("cost");
}
/**
Get level thing
*/
function getLevel()
{
return $this->getProperty("level");
}
/**
Get V0 params thing
*/
function getV0()
{
return $this->getProperty("v0");
}
/**
Get V1 params thing
*/
function getV1()
{
return $this->getProperty("v1");
}
/**
Get V2 params thing
*/
function getV2()
{
return $this->getProperty("v2");
}
/**
Get V3 params thing
*/
function getV3()
{
return $this->getProperty("v3");
}
/**
Get type thing
*/
function getType()
{
return $this->getProperty("type");
}
/**
Get durability things
*/
function getDurability()
{
return $this->getProperty("durability");
}
/**
get collect things
*/
function getCollect()
{
return $this->getProperty("collect");
}
/**
get wear things
*/
function getWearFlag()
{
return $this->getProperty("wear");
}
/**
get make things
*/
function getMake()
{
return $this->getProperty("make");
}
/**
get skill for thing
*/
function getSkill()
{
$skill_id=-1;
$thing_type = $this->getType();
$thing_skill = $this->getV0();
if($thing_type=="weapon"){
if($thing_skill=="melee"){
$skill_id=SKILL_WEAPON_MELEE;
}
if($thing_skill=="hand"){
$skill_id=SKILL_HAND_TO_HAND;
}
}
return $skill_id;
}
}
?>