本文整理汇总了C++中Slayer::getTotalAttr方法的典型用法代码示例。如果您正苦于以下问题:C++ Slayer::getTotalAttr方法的具体用法?C++ Slayer::getTotalAttr怎么用?C++ Slayer::getTotalAttr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Slayer
的用法示例。
在下文中一共展示了Slayer::getTotalAttr方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
//.........这里部分代码省略.........
else if (m_Type == 5) // 카임, 팬던트
{
pMasterItem = pInventory->findItem(Item::ITEM_CLASS_QUEST_ITEM, 1);
// if (pMasterItem == NULL ) pMasterItem = pInventory->findItem(Item::ITEM_CLASS_QUEST_ITEM, 9); //질드레 펜던트
MonsterType = BATORI_TYPE;
}
else if (m_Type == 10) // 질드레, 비쥬
{
pMasterItem = pInventory->findItem(Item::ITEM_CLASS_QUEST_ITEM, 8);
bUpgrade = true;
MonsterType = GDR_TYPE;
}
else if (m_Type == 11) // 질드레, 팬던트
{
pMasterItem = pInventory->findItem(Item::ITEM_CLASS_QUEST_ITEM, 9);
bUpgrade = true;
MonsterType = GDR_TYPE;
}
else if (m_Type == 6) // 젬스톤이지롱~
{
pMasterItem = pInventory->findItem(Item::ITEM_CLASS_QUEST_ITEM, 4);
MonsterType = BATORI_TYPE;
}
else if (m_Type == 7) // 보름달~
{
pMasterItem = pInventory->findItem(Item::ITEM_CLASS_QUEST_ITEM, 5);
ItemMineInfo* pItemMineInfo;
if (pPC->isSlayer() )
{
Slayer* pSlayer = dynamic_cast<Slayer*>(pPC);
Assert(pSlayer != NULL);
Attr_t totalAttr = pSlayer->getTotalAttr(ATTR_BASIC);
if (totalAttr <= 130 ) // 하드코딩 ㅜ.ㅠ
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(0);
else if (totalAttr <= 210 )
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(1);
else if (totalAttr <= 270 )
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(2);
else if (totalAttr <= 300 )
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(3);
else
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(4);
}
else if (pPC->isVampire() )
{
Vampire* pVampire = dynamic_cast<Vampire*>(pPC);
Assert(pVampire != NULL);
Level_t level = pVampire->getLevel();
if (level <= 20 )
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(5);
else if (level <= 40 )
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(6);
else if (level <= 60 )
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(7);
else if (level <= 90 )
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(8);
else
pItemMineInfo = g_pItemMineInfoManager->getItemMineInfo(9);
}
else if (pPC->isOusters() )
{
示例2: execute
//.........这里部分代码省略.........
Item::ItemClass iClass;
ItemType_t iType;
list<OptionType_t> oList;
bool isTimeLimit = false;
bool isLairItem = false;
bool isUnique = false;
MonsterType_t masterType;
switch(pPC->getLottoQuestLevel() )
// switch(pPC->getQuestManager()->getEventQuestAdvanceManager()->getQuestLevel() )
{
case 0:
{
static const string options1[] =
{
"STR+2",
"DEX+2",
"INT+2",
"ASPD+2",
"HP+2"
};
static const string options2[] =
{
"STR+3",
"DEX+3",
"INT+3",
"ASPD+3",
"HP+3"
};
if (pPC->isSlayer() )
{
Slayer* pSlayer = dynamic_cast<Slayer*>(pPC);
QuestGrade_t qGrade = pSlayer->getTotalAttr(ATTR_BASIC);
iClass = Item::ITEM_CLASS_RING;
if (qGrade < 131 )
{
iType = 1;
makeOptionList(options1[ rand()%5 ], oList);
}
else if (qGrade < 211 )
{
iType = 2;
makeOptionList(options1[ rand()%5 ], oList);
}
else if (qGrade < 271 )
{
iType = 3;
makeOptionList(options2[ rand()%5 ], oList);
}
else if (qGrade < 300 )
{
iType = 4;
makeOptionList(options2[ rand()%5 ], oList);
}
else
{
iType = 5;
makeOptionList(options2[ rand()%5 ], oList);
}
}
else if (pPC->isVampire() )
{
Vampire* pVampire = dynamic_cast<Vampire*>(pPC);
示例3: execute
////////////////////////////////////////////////////////////////////////////////
// 액션을 실행한다.
////////////////////////////////////////////////////////////////////////////////
void ActionWarpToNoviceZone::execute (Creature * pNPC , Creature * pCreature)
throw(Error)
{
__BEGIN_TRY
__BEGIN_DEBUG
Assert(pCreature != NULL);
Assert(pCreature->isPC());
if (!pCreature->isSlayer() ) return;
Slayer* pSlayer = dynamic_cast<Slayer*>(pCreature);
ZoneID_t ZoneID = pSlayer->getZoneID();
ZoneCoord_t X = pSlayer->getX();
ZoneCoord_t Y = pSlayer->getY();
Attr_t totalAttr = pSlayer->getTotalAttr(ATTR_BASIC);
GamePlayer* pGamePlayer = dynamic_cast<GamePlayer*>(pCreature->getPlayer());
bool bTransport = true;
if (totalAttr <= 40 )
{
ZoneID = m_NoviceZoneID;
X = m_NoviceX;
Y = m_NoviceY;
}
else if (totalAttr <= 60 )
{
ZoneID = m_BeginnerZoneID;
X = m_BeginnerX;
Y = m_BeginnerY;
}
else
{
GCSystemMessage gcSystemMessage;
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_NOT_BEGINNER ));
pGamePlayer->sendPacket (&gcSystemMessage);
bTransport = false;
}
//Zone* pZone = pCreature->getZone();
#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;
}
}
} catch (NoSuchElementException&) {
}
#endif
if (bTransport)
{
transportCreature(pCreature, ZoneID, X, Y, true);
}
else
{
if (pNPC != NULL )
{
GCNPCResponse response;
response.setCode(NPC_RESPONSE_QUIT_DIALOGUE);
pGamePlayer->sendPacket(&response);
}
//.........这里部分代码省略.........