本文整理汇总了C++中Ousters::removeFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ Ousters::removeFlag方法的具体用法?C++ Ousters::removeFlag怎么用?C++ Ousters::removeFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ousters
的用法示例。
在下文中一共展示了Ousters::removeFlag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: unaffect
void EffectAlignmentRecovery::unaffect(Creature* pCreature)
throw(Error)
{
__BEGIN_TRY
Assert(pCreature != NULL);
if (pCreature->isSlayer())
{
Slayer* pSlayer = dynamic_cast<Slayer*>(pCreature);
Assert(pSlayer != NULL);
Zone* pZone = pSlayer->getZone();
Assert(pZone != NULL);
if (m_Period != 0)
{
// 한 턴에 얼마나 회복 시킬 것인가.
Alignment_t CurrentAlignment = pSlayer->getAlignment();
Alignment_t NewAlignment = min(10000, (int)(CurrentAlignment + m_AlignmentQuantity* m_Period));
pSlayer->setAlignment(NewAlignment);
WORD AlignmentSaveCount = pSlayer->getAlignmentSaveCount();
if (AlignmentSaveCount == 10)
{
StringStream msg;
msg << "Alignment = " << NewAlignment;
pSlayer->tinysave(msg.toString());
AlignmentSaveCount = 0;
}
else AlignmentSaveCount++;
pSlayer->setAlignmentSaveCount(AlignmentSaveCount);
}
// 현재 Alignment를 브로드캐스팅한다.
// 이제 회복이 끝났나는 것을 알리도록 한다.
// 자신에게 먼저
GCModifyInformation gcModifyInformation;
gcModifyInformation.addLongData(MODIFY_ALIGNMENT, pSlayer->getAlignment());
pSlayer->getPlayer()->sendPacket(&gcModifyInformation);
// 주변사람에게도 무언가를 날려줘야 한다.
// 패킷을 새로 만들어야겠지..
pSlayer->removeFlag(Effect::EFFECT_CLASS_ALIGNMENT_RECOVERY);
}
else if (pCreature->isVampire())
{
Vampire* pVampire = dynamic_cast<Vampire*>(pCreature);
//Zone* pZone = pVampire->getZone();
if (m_Period != 0)
{
// 한 턴에 얼마나 회복 시킬 것인가.
Alignment_t CurrentAlignment = pVampire->getAlignment();
Alignment_t NewAlignment = min(10000, (int)(CurrentAlignment + m_AlignmentQuantity* m_Period));
WORD AlignmentSaveCount = pVampire->getAlignmentSaveCount();
if (AlignmentSaveCount == 10)
{
StringStream msg;
msg << "Alignment = " << NewAlignment;
pVampire->tinysave(msg.toString());
AlignmentSaveCount = 0;
}
else AlignmentSaveCount++;
pVampire->setAlignmentSaveCount(AlignmentSaveCount);
}
// 현재 Alignment를 브로드캐스팅한다.
// 이제 회복이 끝났나는 것을 알리도록 한다.
// 자신에게 먼저
GCModifyInformation gcModifyInformation;
gcModifyInformation.addLongData(MODIFY_ALIGNMENT, pVampire->getAlignment());
pVampire->getPlayer()->sendPacket(&gcModifyInformation);
// 주변사람에게도..
pVampire->removeFlag(Effect::EFFECT_CLASS_ALIGNMENT_RECOVERY);
}
else if (pCreature->isOusters())
{
Ousters* pOusters = dynamic_cast<Ousters*>(pCreature);
//Zone* pZone = pOusters->getZone();
if (m_Period != 0)
{
// 한 턴에 얼마나 회복 시킬 것인가.
Alignment_t CurrentAlignment = pOusters->getAlignment();
Alignment_t NewAlignment = min(10000, (int)(CurrentAlignment + m_AlignmentQuantity* m_Period));
WORD AlignmentSaveCount = pOusters->getAlignmentSaveCount();
if (AlignmentSaveCount == 10)
{
StringStream msg;
msg << "Alignment = " << NewAlignment;
pOusters->tinysave(msg.toString());
//.........这里部分代码省略.........