本文整理汇总了C++中Ousters::getFame方法的典型用法代码示例。如果您正苦于以下问题:C++ Ousters::getFame方法的具体用法?C++ Ousters::getFame怎么用?C++ Ousters::getFame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ousters
的用法示例。
在下文中一共展示了Ousters::getFame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: unaffect
//.........这里部分代码省略.........
GCModifyInformation gcAttackerMI;
computeAlignmentChange(pOusters, decreaseHP, pAttackOusters, NULL, &gcAttackerMI);
// 뭔가 변한 정보가 있다면 보내준다.
if (gcAttackerMI.getShortCount()+gcAttackerMI.getLongCount() > 0)
{
pAttackOusters->getPlayer()->sendPacket(&gcAttackerMI);
}
}
// 변한 HP를 브로드캐스팅해준다.
GCStatusCurrentHP pkt;
pkt.setObjectID(pOusters->getObjectID());
pkt.setCurrentHP(RemainHP);
pZone->broadcastPacket(pOusters->getX(), pOusters->getY(), &pkt);
}
}
else if (pCreature->isMonster())
{
Monster* pMonster = dynamic_cast<Monster*>(pCreature);
HP_t CurrentHP = pMonster->getHP(ATTR_CURRENT);
if (CurrentHP > 0)
{
HP_t RemainHP = max(0, CurrentHP -(int)decreaseHP);
pMonster->setHP(RemainHP, ATTR_CURRENT);
// 변한 HP를 브로드캐스팅해준다.
GCStatusCurrentHP pkt;
pkt.setObjectID(pMonster->getObjectID());
pkt.setCurrentHP(RemainHP);
pZone->broadcastPacket(pMonster->getX(), pMonster->getY(), &pkt);
if (RemainHP == 0 )
{
Creature* pAttacker = pZone->getCreature(m_UserObjectID);
if (pAttacker != NULL && pAttacker->isVampire() )
{
Vampire* pAttackVampire = dynamic_cast<Vampire*>(pAttacker);
GCModifyInformation gcMI;
increaseAlignment(pAttackVampire, pCreature, gcMI);
if (gcMI.getShortCount() > 0 || gcMI.getLongCount() > 0 )
pAttackVampire->getPlayer()->sendPacket(&gcMI);
}
}
}
}
// m_CasterName이 pCreature를 죽인 경우의 KillCount 처리
// by sigi. 2002.9.9
if (pCreature->isDead())
{
Creature* pAttacker = pZone->getCreature(m_UserObjectID);
if (pAttacker!=NULL)
{
if (pAttacker->isVampire())
{
Vampire* pVampire = dynamic_cast<Vampire*>(pAttacker);
// 죽일때 경험치를 준다.
GCModifyInformation mi;
int exp = computeCreatureExp(pCreature, KILL_EXP);
shareVampExp(pVampire, exp, mi);
if (pCreature->isMonster() )
{
increaseFame(pVampire, decreaseHP);
mi.addLongData(MODIFY_FAME, pVampire->getFame());
}
pAttacker->getPlayer()->sendPacket(&mi);
}
else if (pAttacker->isOusters() )
{
Ousters* pOusters = dynamic_cast<Ousters*>(pAttacker);
GCModifyInformation mi;
int exp = computeCreatureExp(pCreature, 100);
shareOustersExp(pOusters, exp, mi);
if (pCreature->isMonster() )
{
increaseFame(pOusters, decreaseHP);
mi.addLongData(MODIFY_FAME, pOusters->getFame());
}
}
affectKillCount(pAttacker, pCreature);
}
}
}
__END_DEBUG
__END_CATCH
}