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); }
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); }