mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10520] Implement CONDITION_QUEST_NONE
For case when need check that quest not taken and not completed in past. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
5d8cd04f97
commit
9f2e36c7f0
3 changed files with 10 additions and 2 deletions
|
|
@ -8108,6 +8108,12 @@ bool PlayerCondition::Meets(Player const * player) const
|
|||
}
|
||||
return false;
|
||||
}
|
||||
case CONDITION_QUEST_NONE:
|
||||
{
|
||||
if (!player->IsCurrentQuest(value1) && !player->GetQuestRewardStatus(value1))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -8219,6 +8225,7 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val
|
|||
case CONDITION_QUESTREWARDED:
|
||||
case CONDITION_QUESTTAKEN:
|
||||
case CONDITION_QUESTAVAILABLE:
|
||||
case CONDITION_QUEST_NONE:
|
||||
{
|
||||
Quest const *Quest = sObjectMgr.GetQuestTemplate(value1);
|
||||
if (!Quest)
|
||||
|
|
|
|||
|
|
@ -607,9 +607,10 @@ enum ConditionType
|
|||
CONDITION_QUESTAVAILABLE = 19, // quest_id 0 for case when loot/gossip possible only if player can start quest
|
||||
CONDITION_ACHIEVEMENT = 20, // ach_id 0, 1 (0: has achievement, 1: hasn't achievement) for player
|
||||
CONDITION_ACHIEVEMENT_REALM = 21, // ach_id 0, 1 (0: has achievement, 1: hasn't achievement) for server
|
||||
CONDITION_QUEST_NONE = 22 // quest_id 0 (quest did not take and not rewarded)
|
||||
};
|
||||
|
||||
#define MAX_CONDITION 22 // maximum value in ConditionType enum
|
||||
#define MAX_CONDITION 23 // maximum value in ConditionType enum
|
||||
|
||||
struct PlayerCondition
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10519"
|
||||
#define REVISION_NR "10520"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue