本文整理汇总了C++中Monster::addPrecedence方法的典型用法代码示例。如果您正苦于以下问题:C++ Monster::addPrecedence方法的具体用法?C++ Monster::addPrecedence怎么用?C++ Monster::addPrecedence使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Monster
的用法示例。
在下文中一共展示了Monster::addPrecedence方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: affect
//.........这里部分代码省略.........
pPlayer->sendPacket(&gcMI);
// 변한 HP를 브로드캐스팅해준다.
GCStatusCurrentHP pkt;
pkt.setObjectID(pSlayer->getObjectID());
pkt.setCurrentHP(RemainHP);
m_pZone->broadcastPacket(pSlayer->getX(), pSlayer->getY(), &pkt);
}
/* else if (pCreature->isVampire())
{
Vampire* pVampire = dynamic_cast<Vampire*>(pCreature);
CurrentHP = pVampire->getHP(ATTR_CURRENT);
RemainHP = max(0, CurrentHP -(int)AcidDamage);
pVampire->setHP(RemainHP, ATTR_CURRENT);
GCModifyInformation gcMI;
gcMI.addShortData(MODIFY_CURRENT_HP, pVampire->getHP(ATTR_CURRENT));
Player* pPlayer = pVampire->getPlayer();
Assert(pPlayer != NULL);
pPlayer->sendPacket(&gcMI);
// 변한 HP를 브로드캐스팅해준다.
GCStatusCurrentHP pkt;
pkt.setObjectID(pVampire->getObjectID());
pkt.setCurrentHP(RemainHP);
m_pZone->broadcastPacket(pVampire->getX(), pVampire->getY(), &pkt);
}
*/
else if (pCreature->isOusters())
{
Ousters* pOusters = dynamic_cast<Ousters*>(pCreature);
CurrentHP = pOusters->getHP(ATTR_CURRENT);
RemainHP = max(0, CurrentHP -(int)AcidDamage);
pOusters->setHP(RemainHP, ATTR_CURRENT);
GCModifyInformation gcMI;
gcMI.addShortData(MODIFY_CURRENT_HP, pOusters->getHP(ATTR_CURRENT));
Player* pPlayer = pOusters->getPlayer();
Assert(pPlayer != NULL);
pPlayer->sendPacket(&gcMI);
// 변한 HP를 브로드캐스팅해준다.
GCStatusCurrentHP pkt;
pkt.setObjectID(pOusters->getObjectID());
pkt.setCurrentHP(RemainHP);
m_pZone->broadcastPacket(pOusters->getX(), pOusters->getY(), &pkt);
}
else if (pCreature->isMonster())
{
Monster* pMonster = dynamic_cast<Monster*>(pCreature);
CurrentHP = pMonster->getHP(ATTR_CURRENT);
RemainHP = max(0, CurrentHP -(int)AcidDamage);
pMonster->setHP(RemainHP, ATTR_CURRENT);
if(m_CasterName != "" ) {
// 시전자의 데미지를 추가해 준다.
// 맞는 놈이 몬스터이고, 공격자가 사람이라면,
// 데미지에 따라서 변하는 우선권 테이블을 갱신해 주어야 한다.
pMonster->addPrecedence(m_CasterName, m_PartyID, AcidDamage);
pMonster->setLastHitCreatureClass(Creature::CREATURE_CLASS_VAMPIRE);
}
// 변한 HP를 브로드캐스팅해준다.
GCStatusCurrentHP pkt;
pkt.setObjectID(pMonster->getObjectID());
pkt.setCurrentHP(RemainHP);
m_pZone->broadcastPacket(pMonster->getX(), pMonster->getY(), &pkt);
}
// m_CasterName이 pCreature를 죽인 경우의 KillCount 처리
// by sigi. 2002.8.31
if (pCreature->isDead())
{
Creature* pAttacker = m_pZone->getCreature(m_CasterName);
if (pAttacker!=NULL)
{
affectKillCount(pAttacker, pCreature);
}
}
}
}
}
// 한번만..
//setNextTime(m_Tick);
//cout << "EffectBloodyWallBlocked" << "affect END" << endl;
__END_CATCH
}