本文整理汇总了C++中ItemType::id方法的典型用法代码示例。如果您正苦于以下问题:C++ ItemType::id方法的具体用法?C++ ItemType::id怎么用?C++ ItemType::id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ItemType
的用法示例。
在下文中一共展示了ItemType::id方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ItemType
/*
* CharacterType
*/
CharacterType::CharacterType(
uint32 _id,
uint8 _bloodlineID,
// ItemType stuff:
const ItemGroup &_group,
const TypeData &_data,
// CharacterType stuff:
const ItemType &_shipType,
const CharacterTypeData &_charData)
: ItemType(_id, _group, _data),
m_bloodlineID(_bloodlineID),
m_bloodlineName(_charData.bloodlineName),
m_description(_charData.description),
m_maleDescription(_charData.maleDescription),
m_femaleDescription(_charData.femaleDescription),
m_shipType(_shipType),
m_corporationID(_charData.corporationID),
m_perception(_charData.perception),
m_willpower(_charData.willpower),
m_charisma(_charData.charisma),
m_memory(_charData.memory),
m_intelligence(_charData.intelligence),
m_shortDescription(_charData.shortDescription),
m_shortMaleDescription(_charData.shortMaleDescription),
m_shortFemaleDescription(_charData.shortFemaleDescription)
{
// check for consistency
assert(_data.race == _charData.race);
assert(_charData.shipTypeID == _shipType.id());
}
示例2: ItemType
/*
* BlueprintType
*/
BlueprintType::BlueprintType(
uint32 _id,
const ItemGroup &_group,
const TypeData &_data,
const BlueprintType *_parentBlueprintType,
const ItemType &_productType,
const BlueprintTypeData &_bpData)
: ItemType(_id, _group, _data),
m_parentBlueprintType(_parentBlueprintType),
m_productType(_productType),
m_productionTime(_bpData.productionTime),
m_techLevel(_bpData.techLevel),
m_researchProductivityTime(_bpData.researchProductivityTime),
m_researchMaterialTime(_bpData.researchMaterialTime),
m_researchCopyTime(_bpData.researchCopyTime),
m_researchTechTime(_bpData.researchTechTime),
m_productivityModifier(_bpData.productivityModifier),
m_wasteFactor(_bpData.wasteFactor),
m_chanceOfReverseEngineering(_bpData.chanceOfReverseEngineering),
m_maxProductionLimit(_bpData.maxProductionLimit)
{
// asserts for data consistency
assert(_bpData.productTypeID == _productType.id());
if(_parentBlueprintType != NULL)
assert(_bpData.parentBlueprintTypeID == _parentBlueprintType->id());
}
示例3: RefObject
/*
* InventoryItem
*/
InventoryItem::InventoryItem(
ItemFactory &_factory,
uint32 _itemID,
const ItemType &_type,
const ItemData &_data)
: RefObject( 0 ),
//attributes(_factory, *this, true, true),
mAttributeMap(*this),
mDefaultAttributeMap(*this,true),
m_saveTimer(0,true),
m_factory(_factory),
m_itemID(_itemID),
m_itemName(_data.name),
m_type(_type),
m_ownerID(_data.ownerID),
m_locationID(_data.locationID),
m_flag(_data.flag),
m_contraband(_data.contraband),
m_singleton(_data.singleton),
m_quantity(_data.quantity),
m_position(_data.position),
m_customInfo(_data.customInfo)
{
// assert for data consistency
assert(_data.typeID == _type.id());
//m_saveTimerExpiryTime = ITEM_DB_SAVE_TIMER_EXPIRY * 60 * 1000; // 10 minutes in milliseconds
//m_saveTimer.SetTimer(m_saveTimerExpiryTime); // set timer in milliseconds
m_saveTimer.Disable(); // disable timer by default
_log(ITEM__TRACE, "Created object %p for item %s (%u).", this, itemName().c_str(), itemID());
}
示例4: CelestialObject
/*
* SolarSystem
*/
SolarSystem::SolarSystem(
ItemFactory &_factory,
uint32 _solarSystemID,
// InventoryItem stuff:
const ItemType &_type,
const ItemData &_data,
// CelestialObject stuff:
const CelestialObjectData &_cData,
// SolarSystem stuff:
const ItemType &_sunType,
const SolarSystemData &_ssData)
: CelestialObject(_factory, _solarSystemID, _type, _data, _cData),
m_minPosition(_ssData.minPosition),
m_maxPosition(_ssData.maxPosition),
m_luminosity(_ssData.luminosity),
m_border(_ssData.border),
m_fringe(_ssData.fringe),
m_corridor(_ssData.corridor),
m_hub(_ssData.hub),
m_international(_ssData.international),
m_regional(_ssData.regional),
m_constellation(_ssData.constellation),
m_security(_ssData.security),
m_factionID(_ssData.factionID),
m_radius(_ssData.radius),
m_sunType(_sunType),
m_securityClass(_ssData.securityClass)
{
// consistency check
assert(_sunType.id() == _ssData.sunTypeID);
}