本文整理汇总了C++中StringIdChatParameter::setDI方法的典型用法代码示例。如果您正苦于以下问题:C++ StringIdChatParameter::setDI方法的具体用法?C++ StringIdChatParameter::setDI怎么用?C++ StringIdChatParameter::setDI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringIdChatParameter
的用法示例。
在下文中一共展示了StringIdChatParameter::setDI方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleSliceEffectiveness
void SlicingSessionImplementation::handleSliceEffectiveness(uint8 percent) {
ManagedReference<CreatureObject*> player = this->player.get();
ManagedReference<TangibleObject*> tangibleObject = this->tangibleObject.get();
if (tangibleObject == NULL || player == NULL || !tangibleObject->isArmorObject())
return;
ArmorObject* armor = cast<ArmorObject*>( tangibleObject.get());
Locker locker(armor);
armor->setEffectivenessSlice(percent / 100.f);
armor->setSliced(true);
StringIdChatParameter params;
params.setDI(percent);
params.setStringId("@slicing/slicing:eff_mod");
player->sendSystemMessage(params);
}
示例2: handleSliceSpeed
void SlicingSessionImplementation::handleSliceSpeed(uint8 percent) {
ManagedReference<CreatureObject*> player = this->player.get();
ManagedReference<TangibleObject*> tangibleObject = this->tangibleObject.get();
if (tangibleObject == NULL || player == NULL || !tangibleObject->isWeaponObject())
return;
WeaponObject* weap = cast<WeaponObject*>( tangibleObject.get());
Locker locker(weap);
//TODO: Check for Weapon Powerups and Remove it before the Slice
weap->setSpeedSlice(percent / 100.f);
weap->setSliced(true);
StringIdChatParameter params;
params.setDI(percent);
params.setStringId("@slicing/slicing:spd_mod");
player->sendSystemMessage(params);
}