Core/ConditionMgr: added CONDITION_QUEST_COMPLETE, conditionValue1: questiID, true if player has the quest in the questlog as 'completed'

--HG--
branch : trunk
This commit is contained in:
Rat
2010-10-24 21:44:58 +02:00
parent 88ae092744
commit 5eb8ea2a5d
2 changed files with 9 additions and 1 deletions

View File

@@ -90,6 +90,12 @@ bool Condition::Meets(Player * player, Unit* invoker)
condMeets = (status == QUEST_STATUS_INCOMPLETE);
break;
}
case CONDITION_QUEST_COMPLETE:
{
QuestStatus status = player->GetQuestStatus(mConditionValue1);
condMeets = (status == QUEST_STATUS_COMPLETE);
break;
}
case CONDITION_QUEST_NONE:
{
QuestStatus status = player->GetQuestStatus(mConditionValue1);
@@ -1116,6 +1122,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
case CONDITION_QUESTREWARDED:
case CONDITION_QUESTTAKEN:
case CONDITION_QUEST_NONE:
case CONDITION_QUEST_COMPLETE:
{
Quest const *Quest = sObjectMgr.GetQuestTemplate(cond->mConditionValue1);
if (!Quest)

View File

@@ -55,7 +55,8 @@ enum ConditionType
CONDITION_SPELL = 25, // spell_id 0 +referenceID true if knows spell
CONDITION_NOITEM = 26, // item_id bank +referenceID true if player does not have any of the item (if 'bank' is set it searches in bank slots too)
CONDITION_LEVEL = 27, // level opt +referenceID true if player's level is equal to param1 (param2 can modify the statement)
CONDITION_MAX = 28 // MAX
CONDITION_QUEST_COMPLETE = 28, // quest_id 0 +referenceID true if player has quest_id with all objectives complete, but not yet rewarded
CONDITION_MAX = 29 // MAX
};
enum LevelConditionType