本文整理汇总了C++中QuestLogEntry::SetTrigger方法的典型用法代码示例。如果您正苦于以下问题:C++ QuestLogEntry::SetTrigger方法的具体用法?C++ QuestLogEntry::SetTrigger怎么用?C++ QuestLogEntry::SetTrigger使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QuestLogEntry
的用法示例。
在下文中一共展示了QuestLogEntry::SetTrigger方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPlayerExploreArea
void QuestMgr::OnPlayerExploreArea(Player* plr, uint32 AreaID)
{
uint32 i, j;
QuestLogEntry *qle;
for(i = 0; i < 25; ++i)
{
if((qle = plr->GetQuestLogInSlot(i)))
{
// dont waste time on quests without mobs
if(qle->GetQuest()->count_requiredtriggers == 0)
continue;
for(j = 0; j < 4; ++j)
{
if(qle->GetQuest()->required_triggers[j] == AreaID &&
!qle->m_explored_areas[j])
{
qle->SetTrigger(j);
CALL_QUESTSCRIPT_EVENT(qle, OnExploreArea)(qle->m_explored_areas[j], plr);
qle->UpdatePlayerFields();
if(qle->CanBeFinished())
{
plr->UpdateNearbyGameObjects();
qle->SendQuestComplete();
}
break;
}
}
}
}
}
示例2: OnPlayerEnteredCircle
// public interface for the affray quest
void OnPlayerEnteredCircle(Player *pPlayer)
{
QuestLogEntry *qle = pPlayer->GetQuestLogForEntry(QUEST_THEAFFRAY);
if(qle->CanBeFinished() || qle->HasFailed())
return;
// try to start the affray
if(Start())
{
qle->SetTrigger(0);
qle->UpdatePlayerFields();
}
}