本文整理汇总了C++中PlayerObject::getHealingTarget方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerObject::getHealingTarget方法的具体用法?C++ PlayerObject::getHealingTarget怎么用?C++ PlayerObject::getHealingTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerObject
的用法示例。
在下文中一共展示了PlayerObject::getHealingTarget方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _handleTendWound
void ObjectController::_handleTendWound(uint64 targetId,Message* message,ObjectControllerCmdProperties* cmdProperties)
{
PlayerObject* Medic = dynamic_cast<PlayerObject*>(mObject);
PlayerObject* Target = dynamic_cast<PlayerObject*>(Medic->getHealingTarget(Medic));
//TODO:: add medic droid
/*EMLocationType loc = Medic->getPlayerLocation();
if(loc != EMLocation_Cantina || loc != EMLocation_Camp || loc != EMLocation_PlayerStructure)
{
return;
}*/
std::string messageResponse = gMedicManager->handleMessage(message,"(action|constitution|health|quickness|stamina|strength)");
if (messageResponse.length() == 0) {
//you must specify a valid wound type
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "healing_response_65"), Medic);
return;
}
//check Medic has enough Mind
auto ham = gWorldManager->getKernel()->GetServiceManager()->GetService<swganh::ham::HamService>("HamService");
if(!ham->checkMainPools(Medic, 0, 0, 500)) {
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "not_enough_mind"), Medic);
return;
}
if (gMedicManager->HealWound(Medic, Target, 0, cmdProperties, messageResponse + "tendwound"))
{
ham->ApplyWound(Medic, HamBar_Focus, 5);
ham->ApplyWound(Medic, HamBar_Willpower, 5);
Medic->AddBattleFatigue(2);
//call the event
gMedicManager->startWoundTreatmentEvent(Medic);
return;
}
}
示例2: _handleHealWound
void ObjectController::_handleHealWound(uint64 targetId,Message* message,ObjectControllerCmdProperties* cmdProperties)
{
PlayerObject* Medic = dynamic_cast<PlayerObject*>(mObject);
PlayerObject* Target = dynamic_cast<PlayerObject*>(Medic->getHealingTarget(Medic));
std::string messageResponse = gMedicManager->handleMessage(message,"(action|constitution|health|quickness|stamina|strength)");
if (messageResponse.length() == 0)
{
//you must specify a valid wound type
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "healing_response_65"), Medic);
}
else
{
//check Medic has enough Mind
Ham* ham = Medic->getHam();
if(ham->checkMainPools(0, 0, 140))
{
if (gMedicManager->CheckMedicine(Medic, Target, cmdProperties, messageResponse))
{
//call the event
gMedicManager->startWoundTreatmentEvent(Medic);
return;
}
}
else
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "not_enough_mind"), Medic);
}
}
示例3: _handleTendDamage
void ObjectController::_handleTendDamage(uint64 targetId,Message* message,ObjectControllerCmdProperties* cmdProperties)
{
PlayerObject* Medic = dynamic_cast<PlayerObject*>(mObject);
PlayerObject* Target = dynamic_cast<PlayerObject*>(Medic->getHealingTarget(Medic));
//check Medic has enough Mind
auto ham = gWorldManager->getKernel()->GetServiceManager()->GetService<swganh::ham::HamService>("HamService");
if(!ham->checkMainPools(Medic, cmdProperties->mHealthCost, cmdProperties->mActionCost, cmdProperties->mMindCost)){
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "not_enough_mind"), Medic);
return;
}
if (gMedicManager->HealDamage(Medic, Target, 0, cmdProperties, "tendDamage"))
{
ham->ApplyWound(Medic, HamBar_Focus, 5);
ham->ApplyWound(Medic, HamBar_Willpower, 5);
Medic->AddBattleFatigue(2);
//call the event
gMedicManager->startInjuryTreatmentEvent(Medic);
return;
}
}
示例4: _handleHealWound
void ObjectController::_handleHealWound(uint64 targetId,Message* message,ObjectControllerCmdProperties* cmdProperties)
{
CreatureObject* creature = dynamic_cast<CreatureObject*>(mObject); PlayerObject* Medic = creature->GetGhost();
PlayerObject* Target = dynamic_cast<PlayerObject*>(Medic->getHealingTarget(Medic));
std::string messageResponse = gMedicManager->handleMessage(message,"(action|constitution|health|quickness|stamina|strength)");
if (messageResponse.length() == 0)
{
//you must specify a valid wound type
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "healing_response_65"), Medic);
}
else
{
//check Medic has enough Mind
auto ham = gWorldManager->getKernel()->GetServiceManager()->GetService<swganh::ham::HamService>("HamService");
if(!ham->checkMainPool(Medic->GetCreature(), HamBar_Mind, 140)) {
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "not_enough_mind"), Medic);
return;
}
if (gMedicManager->CheckMedicine(Medic, Target, cmdProperties, messageResponse))
{
//call the event
gMedicManager->startWoundTreatmentEvent(Medic);
return;
}
}
}
示例5: _handleHealDamage
void ObjectController::_handleHealDamage(uint64 targetId, Message* message,ObjectControllerCmdProperties* cmdProperties)
{
PlayerObject* Medic = dynamic_cast<PlayerObject*>(mObject);
PlayerObject* Target = dynamic_cast<PlayerObject*>(Medic->getHealingTarget(Medic));
mHandlerCompleted = gMedicManager->CheckMedicine(Medic, Target, cmdProperties, stim);
if (mHandlerCompleted)
{
//call the event
gMedicManager->startInjuryTreatmentEvent(Medic);
}
}
示例6: _handleQuickHeal
void ObjectController::_handleQuickHeal(uint64 targetId,Message* message,ObjectControllerCmdProperties* cmdProperties)
{
PlayerObject* Medic = dynamic_cast<PlayerObject*>(mObject);
PlayerObject* Target = dynamic_cast<PlayerObject*>(Medic->getHealingTarget(Medic));
//check Medic has enough Mind
Ham* ham = Medic->getHam();
if(ham->checkMainPools(0, 0, cmdProperties->mMindCost))
{
if (gMedicManager->HealDamage(Medic, Target, 0, cmdProperties, "quickHeal"))
{
ham->updatePropertyValue(HamBar_Focus ,HamProperty_Wounds, 10);
ham->updatePropertyValue(HamBar_Willpower ,HamProperty_Wounds, 10);
ham->updateBattleFatigue(2, true);
//call the event
gMedicManager->startQuickHealInjuryTreatmentEvent(Medic);
return;
}
}
else
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "not_enough_mind"), Medic);
}
示例7: _handleTendWound
void ObjectController::_handleTendWound(uint64 targetId,Message* message,ObjectControllerCmdProperties* cmdProperties)
{
PlayerObject* Medic = dynamic_cast<PlayerObject*>(mObject);
PlayerObject* Target = dynamic_cast<PlayerObject*>(Medic->getHealingTarget(Medic));
//TODO:: add medic droid
/*EMLocationType loc = Medic->getPlayerLocation();
if(loc != EMLocation_Cantina || loc != EMLocation_Camp || loc != EMLocation_PlayerStructure)
{
return;
}*/
std::string messageResponse = gMedicManager->handleMessage(message,"(action|constitution|health|quickness|stamina|strength)");
if (messageResponse.length() == 0)
{
//you must specify a valid wound type
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "healing_response_65"), Medic);
}
else
{
//check Medic has enough Mind
Ham* ham = Medic->getHam();
if(ham->checkMainPools(0, 0, 500))
{
if (gMedicManager->HealWound(Medic, Target, 0, cmdProperties, messageResponse + "tendwound"))
{
ham->updatePropertyValue(HamBar_Focus ,HamProperty_Wounds, 5);
ham->updatePropertyValue(HamBar_Willpower ,HamProperty_Wounds, 5);
ham->updateBattleFatigue(2, true);
//call the event
gMedicManager->startWoundTreatmentEvent(Medic);
return;
}
}
else
gMessageLib->SendSystemMessage(::common::OutOfBand("healing_response", "not_enough_mind"), Medic);
}
}