本文整理汇总了C++中Ousters::setSilverDamage方法的典型用法代码示例。如果您正苦于以下问题:C++ Ousters::setSilverDamage方法的具体用法?C++ Ousters::setSilverDamage怎么用?C++ Ousters::setSilverDamage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ousters
的用法示例。
在下文中一共展示了Ousters::setSilverDamage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
//.........这里部分代码省略.........
// HP 채워주고...
if (pVampire->getHP(ATTR_CURRENT) < pVampire->getHP(ATTR_MAX))
{
pVampire->setHP(pVampire->getHP(ATTR_MAX), ATTR_CURRENT);
modifyPkt.addShortData(MODIFY_CURRENT_HP, pVampire->getHP(ATTR_CURRENT));
hpPkt.setObjectID(pVampire->getObjectID());
hpPkt.setCurrentHP(pVampire->getHP(ATTR_CURRENT));
}
// 패킷 날려준다.
removePkt.setObjectID(pVampire->getObjectID());
pPlayer->sendPacket(&modifyPkt);
pZone->broadcastPacket(pVampire->getX(), pVampire->getY(), &removePkt);
pZone->broadcastPacket(pVampire->getX(), pVampire->getY(), &hpPkt, pVampire);
//log(LOG_HEAL, pVampire->getName(), "");
}
else if (pCreature2->isOusters())
{
Ousters* pOusters = dynamic_cast<Ousters*>(pCreature2);
EffectManager* pEffectManager = pOusters->getEffectManager();
GCModifyInformation modifyPkt;
GCRemoveEffect removePkt;
GCStatusCurrentHP hpPkt;
// 먼저 HP랑 MP를 풀로 채워준다.
if (pOusters->getHP(ATTR_CURRENT) < pOusters->getHP(ATTR_MAX) || pOusters->getSilverDamage() != 0 )
{
Silver_t prev = pOusters->getSilverDamage();
if (prev != 0 )
{
pOusters->setSilverDamage(0);
modifyPkt.addShortData(MODIFY_SILVER_DAMAGE, pOusters->getSilverDamage());
}
pOusters->setHP(pOusters->getHP(ATTR_MAX), ATTR_CURRENT);
modifyPkt.addShortData(MODIFY_CURRENT_HP, pOusters->getHP(ATTR_CURRENT));
hpPkt.setObjectID(pOusters->getObjectID());
hpPkt.setCurrentHP(pOusters->getHP(ATTR_CURRENT));
}
if (pOusters->getMP(ATTR_CURRENT) < pOusters->getMP(ATTR_MAX))
{
pOusters->setMP(pOusters->getMP(ATTR_MAX), ATTR_CURRENT);
modifyPkt.addShortData(MODIFY_CURRENT_MP, pOusters->getMP(ATTR_CURRENT));
}
// 독 이펙트를 삭제한다.
Effect* pEffectPoison = pEffectManager->findEffect(Effect::EFFECT_CLASS_POISON);
if (pEffectPoison != NULL)
{
// 이펙트 매니저에서 삭제한다.
pEffectManager->deleteEffect(pOusters, Effect::EFFECT_CLASS_POISON);
// 패킷에다 정보를 더한다.
removePkt.addEffectList((EffectID_t)Effect::EFFECT_CLASS_POISON);
}
// 다크블루 포이즌 이펙트를 삭제한다.
Effect* pEffectDarkBluePoison = pEffectManager->findEffect(Effect::EFFECT_CLASS_DARKBLUE_POISON);
if (pEffectDarkBluePoison != NULL)
{
// 이펙트 매니저에서 삭제한다.
pEffectManager->deleteEffect(pOusters, Effect::EFFECT_CLASS_DARKBLUE_POISON);