本文整理汇总了C++中ManagedReference::getAction方法的典型用法代码示例。如果您正苦于以下问题:C++ ManagedReference::getAction方法的具体用法?C++ ManagedReference::getAction怎么用?C++ ManagedReference::getAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ManagedReference
的用法示例。
在下文中一共展示了ManagedReference::getAction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateCraftingValues
void PetDeedImplementation::updateCraftingValues(CraftingValues* values, bool firstUpdate) {
ManagedReference<ManufactureSchematic*> manufact = values->getManufactureSchematic();
float clFactor = 0;
for (int i = 0; i < manufact->getSlotCount(); ++i) {
// Dna Component Slots
Reference<IngredientSlot* > iSlot = manufact->getSlot(i);
if (iSlot->isComponentSlot()) {
ComponentSlot* cSlot = cast<ComponentSlot*>(iSlot.get());
ManagedReference<TangibleObject*> tano = cSlot->getPrototype();
ManagedReference<GeneticComponent*> component = cast<GeneticComponent*>( tano.get());
// Now we can suck in the values
clFactor = component->getLevel();
quality = component->getQuality();
chanceHit = component->getHit();
attackSpeed = component->getSpeed();
damageMin = component->getMinDamage();
damageMax = component->getMaxDamage();
armor = component->getArmor();
kinResist = round(component->getKinetic());
energyResist = round(component->getEnergy());
blastResist = round(component->getBlast());
coldResist = round(component->getCold());
heatResist = round(component->getHeat());
elecResist = round(component->getElectrical());
acidResist = round(component->getAcid());
stunResist = round(component->getStun());
saberResist = round(component->getSaber());
health = component->getHealth();
action = component->getAction();
mind = component->getMind();
special1 = component->getSpecial1();
special2 = component->getSpecial2();
ranged = component->getRanged();
cleverness = component->getCleverness();
endurance = component->getEndurance();
fierceness = component->getFierceness();
power = component->getPower();
intelligence = component->getIntelligence();
courage = component->getCourage();
dependency = component->getDependency();
dexterity = component->getDexterity();
fortitude = component->getFortitude();
hardiness = component->getHardiness();
if (component->isSpecialResist(WeaponObject::KINETIC))
setSpecialResist(WeaponObject::KINETIC);
if (component->isSpecialResist(WeaponObject::ELECTRICITY))
setSpecialResist(WeaponObject::ELECTRICITY);
if (component->isSpecialResist(WeaponObject::ENERGY))
setSpecialResist(WeaponObject::ENERGY);
if (component->isSpecialResist(WeaponObject::ACID))
setSpecialResist(WeaponObject::ACID);
if (component->isSpecialResist(WeaponObject::BLAST))
setSpecialResist(WeaponObject::BLAST);
if (component->isSpecialResist(WeaponObject::COLD))
setSpecialResist(WeaponObject::COLD);
if (component->isSpecialResist(WeaponObject::HEAT))
setSpecialResist(WeaponObject::HEAT);
if (component->isSpecialResist(WeaponObject::LIGHTSABER))
setSpecialResist(WeaponObject::LIGHTSABER);
if (component->isSpecialResist(WeaponObject::STUN))
setSpecialResist(WeaponObject::STUN);
level = Genetics::calculatePetLevel(component);
}
}
CreatureTemplateManager* creatureTemplateManager = CreatureTemplateManager::instance();
ManagedReference<CreatureTemplate*> petTemplate = creatureTemplateManager->getTemplate( mobileTemplate.hashCode() );
if (petTemplate != NULL) {
// get min CL from the template
int skinFactor = petTemplate->getLevel();
if (level > 75) {
level = 75;
}
if (level < skinFactor) {
level = skinFactor;
}
}
// setup attack map
setupAttacks();
}