596 {
600
602
603 for (QuestRelations::const_iterator i = qir.first; i != qir.second; ++i)
604 {
606 uint32 questId = i->second;
608 if (!quest)
609 continue;
610
612 if (!
sConditionMgr->IsObjectMeetToConditions(player, conditions))
613 continue;
614
618 {
621 else
623 }
626
627 if (result2 > result)
628 result = result2;
629 }
630
631 for (QuestRelations::const_iterator i = qr.first; i != qr.second; ++i)
632 {
634 uint32 questId = i->second;
636 if (!quest)
637 continue;
638
640 if (!
sConditionMgr->IsObjectMeetToConditions(player, conditions))
641 continue;
642
643 switch (questId)
644 {
647 continue;
648 break;
651 continue;
652 break;
655 continue;
656 break;
659 continue;
660 break;
663 continue;
664 break;
667 continue;
668 break;
671 continue;
672 break;
675 continue;
676 break;
677 }
678
679 if (wintergrasp)
680 {
681
682 bool hasCorrectZoneControl = false;
683 switch (questId)
684 {
685
693 {
694 hasCorrectZoneControl = true;
695 }
696 break;
697
706 {
707 hasCorrectZoneControl = true;
708 }
709 break;
710
718 {
719 hasCorrectZoneControl = true;
720 }
721 break;
722
731 {
732 hasCorrectZoneControl = true;
733 }
734 break;
735 default:
736 hasCorrectZoneControl = true;
737 break;
738 }
739
740 if (!hasCorrectZoneControl)
741 {
742 continue;
743 }
744 }
745
748 {
750 {
752 {
756 {
759 else
761 }
762 else
764 }
765 else
767 }
768 }
769
770 if (result2 > result)
771 result = result2;
772 }
773
774 return result;
775 }
std::uint32_t uint32
Definition: Define.h:107
@ QUEST_HEALING_WITH_ROSES_HORDE_DEF
Definition: zone_wintergrasp.cpp:96
@ QUEST_DEFEND_THE_SIEGE_HORDE_ATT
Definition: zone_wintergrasp.cpp:90
@ QUEST_SHOUTHERN_SABOTAGE_ALLIANCE_DEF
Definition: zone_wintergrasp.cpp:110
@ QUEST_SLAY_THEM_ALL_HORDE_DEF
Definition: zone_wintergrasp.cpp:94
@ QUEST_FUELING_THE_DEMOLISHERS_HORDE_DEF
Definition: zone_wintergrasp.cpp:95
@ QUEST_A_RARE_HERB_ALLIANCE_DEF
Definition: zone_wintergrasp.cpp:112
@ QUEST_FUELING_THE_DEMOLISHERS_HORDE_ATT
Definition: zone_wintergrasp.cpp:88
@ QUEST_SLAY_THEM_ALL_HORDE_ATT
Definition: zone_wintergrasp.cpp:87
@ QUEST_STOP_THE_SIEGE_HORDE_DEF
Definition: zone_wintergrasp.cpp:98
@ QUEST_WARDING_THE_WALLS_HORDE_DEF
Definition: zone_wintergrasp.cpp:93
@ QUEST_BONES_AND_ARROWS_ALLIANCE_DEF
Definition: zone_wintergrasp.cpp:107
@ QUEST_A_RARE_HERB_ALLIANCE_ATT
Definition: zone_wintergrasp.cpp:104
@ QUEST_HEALING_WITH_ROSES_HORDE_ATT
Definition: zone_wintergrasp.cpp:89
@ QUEST_BONES_AND_ARROWS_ALLIANCE_ATT
Definition: zone_wintergrasp.cpp:100
@ QUEST_NO_MERCY_FOR_THE_MERCILESS_ALLIANCE_ATT
Definition: zone_wintergrasp.cpp:102
@ QUEST_FUELING_THE_DEMOLISHERS_ALLIANCE_ATT
Definition: zone_wintergrasp.cpp:105
@ QUEST_STOP_THE_SIEGE_ALLIANCE_DEF
Definition: zone_wintergrasp.cpp:111
@ QUEST_NO_MERCY_FOR_THE_MERCILESS_ALLIANCE_DEF
Definition: zone_wintergrasp.cpp:109
@ QUEST_WARDING_THE_WARRIORS_ALLIANCE_ATT
Definition: zone_wintergrasp.cpp:101
@ QUEST_TOPPLING_THE_TOWERS_HORDE_DEF
Definition: zone_wintergrasp.cpp:97
@ QUEST_BONES_AND_ARROWS_HORDE_DEF
Definition: zone_wintergrasp.cpp:92
@ QUEST_WARDING_THE_WARRIORS_ALLIANCE_DEF
Definition: zone_wintergrasp.cpp:108
@ QUEST_FUELING_THE_DEMOLISHERS_ALLIANCE_DEF
Definition: zone_wintergrasp.cpp:113
@ QUEST_BONES_AND_ARROWS_HORDE_ATT
Definition: zone_wintergrasp.cpp:85
@ QUEST_DEFEND_THE_SIEGE_ALLIANCE_ATT
Definition: zone_wintergrasp.cpp:103
@ QUEST_JINXING_THE_WALLS_HORDE_ATT
Definition: zone_wintergrasp.cpp:86
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
@ TEAM_HORDE
Definition: SharedDefines.h:761
@ BATTLEFIELD_BATTLEID_WG
Definition: Battlefield.h:35
#define sBattlefieldMgr
Definition: BattlefieldMgr.h:77
std::pair< QuestRelations::const_iterator, QuestRelations::const_iterator > QuestRelationBounds
Definition: ObjectMgr.h:525
#define sObjectMgr
Definition: ObjectMgr.h:1635
QuestGiverStatus
Definition: QuestDef.h:111
@ DIALOG_STATUS_UNAVAILABLE
Definition: QuestDef.h:113
@ DIALOG_STATUS_NONE
Definition: QuestDef.h:112
@ DIALOG_STATUS_AVAILABLE
Definition: QuestDef.h:120
@ DIALOG_STATUS_REWARD
Definition: QuestDef.h:122
@ DIALOG_STATUS_LOW_LEVEL_AVAILABLE
Definition: QuestDef.h:114
@ DIALOG_STATUS_REWARD_REP
Definition: QuestDef.h:118
@ DIALOG_STATUS_INCOMPLETE
Definition: QuestDef.h:117
@ DIALOG_STATUS_AVAILABLE_REP
Definition: QuestDef.h:119
QuestStatus
Definition: QuestDef.h:99
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
@ QUEST_STATUS_NONE
Definition: QuestDef.h:100
@ QUEST_STATUS_COMPLETE
Definition: QuestDef.h:101
@ CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF
Definition: IWorld.h:287
#define sPoolMgr
Definition: PoolMgr.h:163
#define sConditionMgr
Definition: ConditionMgr.h:290
@ CONDITION_SOURCE_TYPE_QUEST_AVAILABLE
Definition: ConditionMgr.h:142
std::list< Condition * > ConditionList
Definition: ConditionMgr.h:237
#define sWorld
Definition: World.h:443
Definition: Battlefield.h:204
TeamId GetDefenderTeam()
Definition: Battlefield.h:275
TeamId GetAttackerTeam()
Definition: Battlefield.h:276
uint32 GetEntry() const
Definition: Object.h:115
int32 GetQuestLevel(Quest const *quest) const
Definition: Player.h:1434
bool GetQuestRewardStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1414
bool CanTakeQuest(Quest const *quest, bool msg)
Definition: PlayerQuest.cpp:251
bool CanSeeStartQuest(Quest const *quest)
Definition: PlayerQuest.cpp:237
bool SatisfyQuestLevel(Quest const *qInfo, bool msg) const
Definition: PlayerQuest.cpp:966
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1429
uint8 GetLevel() const
Definition: Unit.h:1024
Definition: QuestDef.h:210
bool IsRepeatable() const
Definition: QuestDef.h:283
bool IsAutoComplete() const
Definition: QuestDef.cpp:274
uint32 GetQuestId() const
Definition: QuestDef.h:228
bool IsDaily() const
Definition: QuestDef.h:287
bool IsDailyOrWeekly() const
Definition: QuestDef.h:291