本文整理汇总了C++中Performance::getHealMindWound方法的典型用法代码示例。如果您正苦于以下问题:C++ Performance::getHealMindWound方法的具体用法?C++ Performance::getHealMindWound怎么用?C++ Performance::getHealMindWound使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Performance
的用法示例。
在下文中一共展示了Performance::getHealMindWound方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doEntertainerPatronEffects
void EntertainingSessionImplementation::doEntertainerPatronEffects() {
ManagedReference<CreatureObject*> creo = entertainer.get();
if (creo == NULL)
return;
if (performanceName == "")
return;
Locker locker(creo);
//**DECLARATIONS**
VectorMap<ManagedReference<CreatureObject*>, EntertainingData>* patrons = NULL;
SkillManager* skillManager = creo->getZoneServer()->getSkillManager();
PerformanceManager* performanceManager = skillManager->getPerformanceManager();
Performance* performance = NULL;
ManagedReference<Instrument*> instrument = getInstrument(creo);
float woundHealingSkill = 0.0f;
float playerShockHealingSkill = 0.0f;
float buildingShockHealingSkill = creo->getSkillMod("private_med_battle_fatigue");
float factionPerkSkill = creo->getSkillMod("private_faction_mind_heal");
//**LOAD PATRONS, GET THE PERFORMANCE AND ENT'S HEALING SKILL.**
if (dancing) {
patrons = &watchers;
performance = performanceManager->getDance(performanceName);
woundHealingSkill = (float) creo->getSkillMod("healing_dance_wound");
playerShockHealingSkill = (float) creo->getSkillMod("healing_dance_shock");
} else if (playingMusic && instrument != NULL) {
patrons = &listeners;
performance = performanceManager->getSong(performanceName, instrument->getInstrumentType());
woundHealingSkill = (float) creo->getSkillMod("healing_music_wound");
playerShockHealingSkill = (float) creo->getSkillMod("healing_music_shock");
} else {
cancelSession();
return;
}
if (performance == NULL) {
return;
}
ManagedReference<BuildingObject*> building = creo->getRootParent().get().castTo<BuildingObject*>();
if (building != NULL && factionPerkSkill > 0 && building->isPlayerRegisteredWithin(creo->getObjectID())) {
unsigned int buildingFaction = building->getFaction();
unsigned int healerFaction = creo->getFaction();
PlayerObject* ghost = creo->getPlayerObject();
if (ghost != NULL && healerFaction != 0 && healerFaction == buildingFaction && ghost->getFactionStatus() == FactionStatus::OVERT) {
woundHealingSkill += factionPerkSkill;
playerShockHealingSkill += factionPerkSkill;
}
}
//**DETERMINE WOUND HEAL AMOUNTS.**
int woundHeal = ceil(performance->getHealMindWound() * (woundHealingSkill / 100.0f));
int shockHeal = ceil(performance->getHealShockWound() * ((playerShockHealingSkill + buildingShockHealingSkill) / 100.0f));
//**ENTERTAINER HEALS THEIR OWN MIND.**
healWounds(creo, woundHeal*(flourishCount+1), shockHeal*(flourishCount+1));
//**APPLY EFFECTS TO PATRONS.**
if (patrons != NULL && patrons->size() > 0) {
for (int i = 0; i < patrons->size(); ++i) {
ManagedReference<CreatureObject*> patron = patrons->elementAt(i).getKey();
try {
//**VERIFY THE PATRON IS NOT ON THE DENY SERVICE LIST
if (creo->isInRange(patron, 10.0f)) {
healWounds(patron, woundHeal*(flourishCount+1), shockHeal*(flourishCount+1));
increaseEntertainerBuff(patron);
} else { //patron is not in range, force to stop listening
ManagedReference<PlayerManager*> playerManager = patron->getZoneServer()->getPlayerManager();
Locker locker(patron, entertainer.get());
if (dancing) {
if (playerManager != NULL)
playerManager->stopWatch(patron, creo->getObjectID(), true, false, false, true);
if (!patron->isListening())
sendEntertainmentUpdate(patron, 0, "", true);
} else if (playingMusic) {
if (playerManager != NULL)
playerManager->stopListen(patron, creo->getObjectID(), true, false, false, true);
if (!patron->isWatching())
sendEntertainmentUpdate(patron, 0, "", true);
}
}
//.........这里部分代码省略.........