本文整理汇总了C++中Slayer::getOffMotorcycle方法的典型用法代码示例。如果您正苦于以下问题:C++ Slayer::getOffMotorcycle方法的具体用法?C++ Slayer::getOffMotorcycle怎么用?C++ Slayer::getOffMotorcycle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Slayer
的用法示例。
在下文中一共展示了Slayer::getOffMotorcycle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
////////////////////////////////////////////////////////////////////////////////
// 액션을 실행한다.
////////////////////////////////////////////////////////////////////////////////
void ActionEnterGDRLair::execute (Creature * pNPC , Creature * pCreature)
throw(Error)
{
__BEGIN_TRY
__BEGIN_DEBUG
Assert(pCreature != NULL);
Assert(pCreature->isPC());
GamePlayer* pGamePlayer = dynamic_cast<GamePlayer*>(pCreature->getPlayer());
PlayerCreature* pPC = dynamic_cast<PlayerCreature*>(pCreature);
Assert(pPC != NULL);
ZoneID_t zoneID;
ZoneCoord_t X, Y;
if (m_PortalID == GDRLairManager::Instance().getCorrectPortal() )
{
zoneID = 1412;
X = 142;
Y = 169;
}
else
{
zoneID = 1411;
X = 125;
Y = 58;
}
bool bTransport = true;
#if defined(__PAY_SYSTEM_ZONE__) || defined(__PAY_SYSTEM_FREE_LIMIT__)
try {
ZoneInfo* pZoneInfo = g_pZoneInfoManager->getZoneInfo(zoneID);
// 유료존인데 유료사용자가 아니면...
if (pZoneInfo==NULL
|| pZoneInfo->isPayPlay() && !pGamePlayer->isPayPlaying())
{
string connectIP = pGamePlayer->getSocket()->getHost();
// 유료 서비스 사용이 가능한가?
if (pGamePlayer->loginPayPlay(connectIP, pGamePlayer->getID()))
{
sendPayInfo(pGamePlayer);
}
else
{
// 유료 서비스 사용 불가인 경우
GCSystemMessage gcSystemMessage;
if (g_pConfig->getPropertyInt("IsNetMarble")==0)
{
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_CANNOT_ENTER_PAY_ZONE ));
}
else
{
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_CANNOT_ENTER ));
}
pGamePlayer->sendPacket (&gcSystemMessage);
bTransport = false;
return;
}
}
} catch (NoSuchElementException&) {
}
#endif
if (bTransport)
{
if (pPC->isSlayer() )
{
Slayer* pSlayer = dynamic_cast<Slayer*>(pPC);
Assert(pSlayer != NULL);
// 오토바이를 타고 있으면 오토바이에서 내린다.
if (pSlayer->hasRideMotorcycle() )
{
pSlayer->getOffMotorcycle();
}
}
if (pPC->isOusters() )
{
Ousters* pOusters = dynamic_cast<Ousters*>(pPC);
Assert(pOusters != NULL);
// 실프 타고 있으면 내려준다
if (pOusters->isFlag(Effect::EFFECT_CLASS_SUMMON_SYLPH) )
{
Effect* pEffect = pOusters->findEffect(Effect::EFFECT_CLASS_SUMMON_SYLPH);
if (pEffect != NULL ) pEffect->setDeadline(0);
}
//.........这里部分代码省略.........
示例2: execute
////////////////////////////////////////////////////////////////////////////////
// 액션을 실행한다.
////////////////////////////////////////////////////////////////////////////////
void ActionActivatePortal::execute (Creature * pNPC , Creature * pCreature)
throw(Error)
{
__BEGIN_TRY
__BEGIN_DEBUG
Assert(pCreature != NULL);
Assert(pCreature->isPC());
GamePlayer* pGamePlayer = dynamic_cast<GamePlayer*>(pCreature->getPlayer());
PlayerCreature* pPC = dynamic_cast<PlayerCreature*>(pCreature);
//Zone* pZone = pCreature->getZone();
bool bTransport = true;
#if defined(__PAY_SYSTEM_ZONE__) || defined(__PAY_SYSTEM_FREE_LIMIT__)
try {
ZoneInfo* pZoneInfo = g_pZoneInfoManager->getZoneInfo(m_ZoneID);
// 유료존인데 유료사용자가 아니면...
if (pZoneInfo==NULL
|| pZoneInfo->isPayPlay() && !pGamePlayer->isPayPlaying())
{
string connectIP = pGamePlayer->getSocket()->getHost();
// 유료 서비스 사용이 가능한가?
if (pGamePlayer->loginPayPlay(connectIP, pGamePlayer->getID()))
{
sendPayInfo(pGamePlayer);
}
else if (!pGamePlayer->isFamilyFreePass() ) // 패밀리 프리 패스는 유료존으로 갈 수 있다.
{
// 유료 서비스 사용 불가인 경우
GCSystemMessage gcSystemMessage;
if (g_pConfig->getPropertyInt("IsNetMarble")==0)
{
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_CANNOT_ENTER_PAY_ZONE));
}
else
{
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_CANNOT_ENTER));
}
pGamePlayer->sendPacket (&gcSystemMessage);
bTransport = false;
}
}
} catch (NoSuchElementException&) {
}
#endif
if (bTransport)
{
if (m_ZoneID == 1410 )
{
if (pCreature->isFlag(Effect::EFFECT_CLASS_CAN_ENTER_GDR_LAIR ) )
{
Effect* pEffect = pCreature->findEffect(Effect::EFFECT_CLASS_CAN_ENTER_GDR_LAIR);
if (pEffect != NULL ) pEffect->setDeadline(0);
}
if (pCreature->isSlayer() )
{
Slayer* pSlayer = dynamic_cast<Slayer*>(pCreature);
Assert(pSlayer != NULL);
// 오토바이를 타고 있으면 오토바이에서 내린다.
if (pSlayer->hasRideMotorcycle() )
{
pSlayer->getOffMotorcycle();
}
}
if (pCreature->isOusters() )
{
Ousters* pOusters = dynamic_cast<Ousters*>(pCreature);
Assert(pOusters != NULL);
// 실프 타고 있으면 내려준다
if (pOusters->isFlag(Effect::EFFECT_CLASS_SUMMON_SYLPH) )
{
Effect* pEffect = pOusters->findEffect(Effect::EFFECT_CLASS_SUMMON_SYLPH);
if (pEffect != NULL ) pEffect->setDeadline(0);
}
}
if (pCreature->isVampire() )
{
Vampire* pVampire = dynamic_cast<Vampire*>(pCreature);
Assert(pVampire != NULL);
if (pVampire->isFlag(Effect::EFFECT_CLASS_TRANSFORM_TO_BAT) )
{
addUntransformCreature(pVampire->getZone(), pVampire, true);
//.........这里部分代码省略.........