void ProcDead_PD2(CNPC* df) { if (df->m_pZone->m_index == ZONE_SINGLE_DUNGEON2) { CCharacter* ch = NULL; CPC* pc = NULL; int i, j; for (i = 0; i < df->m_pArea->m_size[0]; i++) { for (j = 0; j < df->m_pArea->m_size[1]; j++) { ch = df->m_pArea->m_cell[i][j].m_listChar; while (ch) { if (IS_PC(ch) && !DEAD(ch)) { pc = TO_PC(ch); break; } ch = ch->m_pCellNext; } } } if (!pc) return ; // 퀘스트 실패 CQuest* pQuest = NULL; CQuest* pQuestNext = NULL; const CQuestProto* pQuestProto = NULL; pQuestNext = pc->m_questList.GetNextQuest(NULL, QUEST_STATE_RUN); while ((pQuest = pQuestNext)) { pQuestNext = pc->m_questList.GetNextQuest(pQuestNext, QUEST_STATE_RUN); // 구출형 퀘스트 이고 if (pQuest->GetQuestType0() == QTYPE_KIND_SAVE) { pQuestProto = pQuest->GetQuestProto(); int j; for (j = 0; j < QUEST_MAX_CONDITION; j++) { // 죽은 df가 구출할 공주 이면 if (pQuestProto->m_conditionType[j] == QCONDITION_NPC && pQuestProto->m_conditionIndex[j] == df->m_proto->m_index) { // 아이템 삭제 pQuest->RemoeQuestItem(pc); // Quest Fail Log GAMELOG << init("QUEST FAIL", pc) << pQuestProto->m_index << end; CNetMsg::SP rmsg(new CNetMsg); QuestFailMsg(rmsg, pQuest); pc->m_questList.DelQuest(pc, pQuest); SEND_Q(rmsg, pc->m_desc); return ; } } } } // while (pQuest) } }