本文整理汇总了C++中Ousters::getOustersRecord方法的典型用法代码示例。如果您正苦于以下问题:C++ Ousters::getOustersRecord方法的具体用法?C++ Ousters::getOustersRecord怎么用?C++ Ousters::getOustersRecord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ousters
的用法示例。
在下文中一共展示了Ousters::getOustersRecord方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: unaffect
void EffectEvade::unaffect(Creature* pCreature)
throw(Error)
{
__BEGIN_TRY
//cout << "EffectEvade" << "unaffect BEGIN" << endl;
Assert(pCreature != NULL);
Assert(pCreature->isOusters());
// 플래그를 끈다.
pCreature->removeFlag(Effect::EFFECT_CLASS_EVADE);
Zone* pZone = pCreature->getZone();
Assert(pZone != NULL);
Ousters* pTargetOusters = dynamic_cast<Ousters*>(pCreature);
Assert(pTargetOusters != NULL);
OUSTERS_RECORD prev;
pTargetOusters->getOustersRecord(prev);
pTargetOusters->initAllStat();
pTargetOusters->sendRealWearingInfo();
pTargetOusters->sendModifyInfo(prev);
// 이펙트를 삭제하라고 알려준다.
GCRemoveEffect gcRemoveEffect;
gcRemoveEffect.setObjectID(pCreature->getObjectID());
gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_EVADE);
pZone->broadcastPacket(pCreature->getX(), pCreature->getY(), &gcRemoveEffect);
//cout << "EffectEvade" << "unaffect END" << endl;
__END_CATCH
}
示例2: execute
//.........这里部分代码省略.........
pTargetSlayer->initAllStat();
pTargetSlayer->addModifyInfo(prev, _GCSkillToObjectOK2);
}
else
{
SLAYER_RECORD prev;
pTargetSlayer->getSlayerRecord(prev);
pTargetSlayer->initAllStat();
pTargetSlayer->addModifyInfo(prev, _GCSkillToObjectOK6);
}
}
else if (pTargetCreature->isVampire())
{
Vampire* pTargetVampire = dynamic_cast<Vampire*>(pTargetCreature);
VAMPIRE_RECORD prev;
pTargetVampire->getVampireRecord(prev);
pTargetVampire->initAllStat();
if (bCanSeeCaster)
{
pTargetVampire->addModifyInfo(prev, _GCSkillToObjectOK2);
}
else
{
pTargetVampire->addModifyInfo(prev, _GCSkillToObjectOK6);
}
}
else if (pTargetCreature->isOusters())
{
Ousters* pTargetOusters = dynamic_cast<Ousters*>(pTargetCreature);
OUSTERS_RECORD prev;
pTargetOusters->getOustersRecord(prev);
pTargetOusters->initAllStat();
if (bCanSeeCaster)
{
pTargetOusters->addModifyInfo(prev, _GCSkillToObjectOK2);
}
else
{
pTargetOusters->addModifyInfo(prev, _GCSkillToObjectOK6);
}
}
else if (pTargetCreature->isMonster())
{
Monster* pTargetMonster = dynamic_cast<Monster*>(pTargetCreature);
pTargetMonster->initAllStat();
}
else Assert(false);
_GCSkillToObjectOK1.setSkillType(SkillType);
_GCSkillToObjectOK1.setCEffectID(CEffectID);
_GCSkillToObjectOK1.setTargetObjectID(TargetObjectID);
_GCSkillToObjectOK1.setDuration(output.Duration);
_GCSkillToObjectOK2.setObjectID(pVampire->getObjectID());
_GCSkillToObjectOK2.setSkillType(SkillType);
_GCSkillToObjectOK2.setDuration(output.Duration);
_GCSkillToObjectOK3.setObjectID(pVampire->getObjectID());
_GCSkillToObjectOK3.setSkillType(SkillType);
_GCSkillToObjectOK3.setTargetXY (targetX, targetY);
_GCSkillToObjectOK4.setSkillType(SkillType);
示例3: execute
//.........这里部分代码省略.........
//log(LOG_USE_BONUS_POINT, pVampire->getName(), "", "DEX");
}
// 바뀐 보너스 포인트를 저장한다.
Bonus_t OldBonus = pVampire->getBonus();
pVampire->setBonus(OldBonus - 1);
StringStream sst;
sst << "Bonus = " << (int)(OldBonus - 1);
pVampire->tinysave(sst.toString());
// 능력치가 변화되었으니, stat을 새로 고친다.
pVampire->initAllStat();
// 클라이언트의 계산 순서 때문에 생기는 버그로 인하여,
// 먼저 인증 패킷을 날려준 후에, 바뀐 능력치에 대한 정보를 보낸다.
// 나중에 CGUseBonusPointOK에다 바로 바뀐 능력치에 대한 정보를
// 실어보내도록 해야 한다.
// OK 패킷을 보내준다.
GCUseBonusPointOK okpkt;
pGamePlayer->sendPacket (&okpkt);
// 바뀐 능력치에 관한 정보를 보내준다.
pVampire->sendModifyInfo(oldRecord);
pVampire->sendRealWearingInfo();
}
else if (pCreature->isOusters() )
{
// 보너스 포인트가 없다면 리턴
Ousters* pOusters = dynamic_cast<Ousters*>(pCreature);
if (pOusters->getBonus() <= 0)
{
GCUseBonusPointFail failPkt;
pPlayer->sendPacket(&failPkt);
return;
}
OUSTERS_RECORD oldRecord;
// 능력치를 올리기 전에 기존의 능력치를 저장한다.
pOusters->getOustersRecord(oldRecord);
if (which == INC_INT)
{
cur = pOusters->getINT(ATTR_BASIC) + 1;
pOusters->setINT(cur, ATTR_BASIC);
StringStream sst;
sst << "INTE = " << (int)cur;
pOusters->tinysave(sst.toString());
}
else if (which == INC_STR)
{
cur = pOusters->getSTR(ATTR_BASIC) + 1;
pOusters->setSTR(cur, ATTR_BASIC);
StringStream sst;
sst << "STR = " << (int)cur;
pOusters->tinysave(sst.toString());
}
else if (which == INC_DEX)
{
cur = pOusters->getDEX(ATTR_BASIC) + 1;
pOusters->setDEX(cur, ATTR_BASIC);
StringStream sst;
sst << "DEX = " << (int)cur;
pOusters->tinysave(sst.toString());
}
// 바뀐 보너스 포인트를 저장한다.
Bonus_t OldBonus = pOusters->getBonus();
pOusters->setBonus(OldBonus - 1);
StringStream sst;
sst << "Bonus = " << (int)(OldBonus - 1);
pOusters->tinysave(sst.toString());
// 능력치가 변화되었으니, stat을 새로 고친다.
pOusters->initAllStat();
// OK 패킷을 보내준다.
GCUseBonusPointOK okpkt;
pGamePlayer->sendPacket(&okpkt);
// 바뀐 능력치에 관한 정보를 보내준다.
pOusters->sendModifyInfo(oldRecord);
pOusters->sendRealWearingInfo();
}
else
{
GCUseBonusPointFail failPkt;
pPlayer->sendPacket(&failPkt);
return;
}
#endif // __GAME_SERVER__
__END_DEBUG
__END_DEBUG_EX __END_CATCH
}
示例4: unaffect
void EffectDoom::unaffect(Creature* pCreature)
throw(Error)
{
__BEGIN_TRY
__BEGIN_DEBUG
//cout << "EffectDoom" << "unaffect BEGIN" << endl;
Assert(pCreature != NULL);
// 능력치를 정상적으로 되돌리기 위해서는 플래그를 끄고,
// initAllStat을 불러야 한다.
pCreature->removeFlag(Effect::EFFECT_CLASS_DOOM);
if (pCreature->isVampire())
{
Vampire* pTargetVampire = dynamic_cast<Vampire*>(pCreature);
VAMPIRE_RECORD prev;
pTargetVampire->getVampireRecord(prev);
pTargetVampire->initAllStat();
pTargetVampire->sendRealWearingInfo();
pTargetVampire->sendModifyInfo(prev);
}
else if (pCreature->isMonster())
{
Monster* pMonster = dynamic_cast<Monster*>(pCreature);
pMonster->initAllStat();
}
else if (pCreature->isSlayer())
{
Slayer* pTargetSlayer = dynamic_cast<Slayer*>(pCreature);
SLAYER_RECORD prev;
pTargetSlayer->getSlayerRecord(prev);
pTargetSlayer->initAllStat();
pTargetSlayer->sendRealWearingInfo();
pTargetSlayer->sendModifyInfo(prev);
}
else if (pCreature->isOusters())
{
Ousters* pTargetOusters = dynamic_cast<Ousters*>(pCreature);
OUSTERS_RECORD prev;
pTargetOusters->getOustersRecord(prev);
pTargetOusters->initAllStat();
pTargetOusters->sendRealWearingInfo();
pTargetOusters->sendModifyInfo(prev);
}
else Assert(false);
Zone* pZone = pCreature->getZone();
Assert(pZone != NULL);
GCRemoveEffect gcRemoveEffect;
gcRemoveEffect.setObjectID(pCreature->getObjectID());
gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_DOOM);
pZone->broadcastPacket(pCreature->getX(), pCreature->getY(), &gcRemoveEffect);
//cout << "EffectDoom" << "unaffect END" << endl;
__END_DEBUG
__END_CATCH
}
示例5: execute
//.........这里部分代码省略.........
for (; itr != rRequiredSkills.end(); ++itr )
{
if (pOusters->hasSkill(*itr) != NULL )
{
bool canDrop = false;
SkillInfo* pFollowingSkillInfo = g_pSkillInfoManager->getSkillInfo(*itr);
list<SkillType_t>& rRequireSkills = pFollowingSkillInfo->getRequireSkills();
list<SkillType_t>::iterator itr2 = rRequireSkills.begin();
for (; itr2 != rRequireSkills.end(); ++itr2 )
{
if ((*itr2) != targetSkillType && pOusters->hasSkill(*itr2) != NULL )
{
SkillInfo* pAlternativeSkillInfo = g_pSkillInfoManager->getSkillInfo(*itr2);
if (getSkillMapID((ElementalDomain)pAlternativeSkillInfo->getElementalDomain()) == getSkillMapID((ElementalDomain)pTargetSkillInfo->getElementalDomain()) )
canDrop = true;
}
}
if (!canDrop )
{
failpkt.setDesc(CANNOT_DROP_SKILL);
pPlayer->sendPacket(&failpkt);
return;
}
}
}
}
/* if (pTargetSkillSlot->getExpLevel() >= 30 )
{
failpkt.setDesc(TOO_HIGH);
pPlayer->sendPacket(&failpkt);
return;
}*/
Assert(pTargetSkillInfo != NULL);
int backPoint = pTargetSkillInfo->getLevelUpPoint();
Price_t downPrice = (int)(backPoint * pow(pOusters->getLevel(),1.3) * 200);
if (pTargetSkillSlot->getExpLevel() <= 1 )
{
downPrice *= 5;
if (downPrice == 0 ) downPrice = 1000000;
}
if (pOusters->getGold() < downPrice )
{
failpkt.setDesc(NOT_ENOUGH_MONEY);
pPlayer->sendPacket(&failpkt);
return;
}
pOusters->decreaseGoldEx(downPrice);
pTargetSkillSlot->setExpLevel(pTargetSkillSlot->getExpLevel() - 1);
pTargetSkillSlot->save();
if (pTargetSkillSlot->getExpLevel() <= 0 )
{
pTargetSkillSlot->destroy(pOusters->getName());
backPoint = pTargetSkillInfo->getSkillPoint();
pOusters->removeSkill(targetSkillType);
}
pOusters->setSkillBonus(pOusters->getSkillBonus() + backPoint);
char query[50];
sprintf(query, "SkillBonus=%d", pOusters->getSkillBonus());
pOusters->tinysave(query);
GCDownSkillOK okpkt;
okpkt.setSkillType(targetSkillType);
pPlayer->sendPacket(&okpkt);
GCModifyInformation gcMI;
gcMI.addLongData(MODIFY_GOLD, pOusters->getGold());
gcMI.addShortData(MODIFY_SKILL_BONUS_POINT, pOusters->getSkillBonus());
switch (targetSkillType )
{
case SKILL_HIDE_SIGHT:
{
OUSTERS_RECORD prev;
pOusters->getOustersRecord(prev);
pOusters->initAllStat();
pOusters->sendRealWearingInfo();
pOusters->addModifyInfo(prev, gcMI);
}
break;
default :
break;
}
pPlayer->sendPacket(&gcMI);
#endif // __GAME_SERVER__
__END_DEBUG_EX __END_CATCH
}