TrinityCore
enuminfo_QuestDef.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "QuestDef.h"
19#include "Define.h"
20#include "SmartEnum.h"
21#include <stdexcept>
22
24{
25
26/********************************************************************\
27|* data for enum 'QuestFailedReason' in 'QuestDef.h' auto-generated *|
28\********************************************************************/
29template <>
31{
32 switch (value)
33 {
34 case QUEST_ERR_NONE: return { "QUEST_ERR_NONE", "QUEST_ERR_NONE", "" };
35 case QUEST_ERR_FAILED_LOW_LEVEL: return { "QUEST_ERR_FAILED_LOW_LEVEL", "QUEST_ERR_FAILED_LOW_LEVEL", "\042You are not high enough level for that quest.\042\042" };
36 case QUEST_ERR_FAILED_WRONG_RACE: return { "QUEST_ERR_FAILED_WRONG_RACE", "QUEST_ERR_FAILED_WRONG_RACE", "\042That quest is not available to your race.\042" };
37 case QUEST_ERR_ALREADY_DONE: return { "QUEST_ERR_ALREADY_DONE", "QUEST_ERR_ALREADY_DONE", "\042You have completed that daily quest today.\042" };
38 case QUEST_ERR_ONLY_ONE_TIMED: return { "QUEST_ERR_ONLY_ONE_TIMED", "QUEST_ERR_ONLY_ONE_TIMED", "\042You can only be on one timed quest at a time\042" };
39 case QUEST_ERR_ALREADY_ON1: return { "QUEST_ERR_ALREADY_ON1", "QUEST_ERR_ALREADY_ON1", "\042You are already on that quest\042" };
40 case QUEST_ERR_FAILED_EXPANSION: return { "QUEST_ERR_FAILED_EXPANSION", "QUEST_ERR_FAILED_EXPANSION", "\042This quest requires an expansion enabled account.\042" };
41 case QUEST_ERR_ALREADY_ON2: return { "QUEST_ERR_ALREADY_ON2", "QUEST_ERR_ALREADY_ON2", "\042You are already on that quest\042" };
42 case QUEST_ERR_FAILED_MISSING_ITEMS: return { "QUEST_ERR_FAILED_MISSING_ITEMS", "QUEST_ERR_FAILED_MISSING_ITEMS", "\042You don't have the required items with you. Check storage.\042" };
43 case QUEST_ERR_FAILED_NOT_ENOUGH_MONEY: return { "QUEST_ERR_FAILED_NOT_ENOUGH_MONEY", "QUEST_ERR_FAILED_NOT_ENOUGH_MONEY", "\042You don't have enough money for that quest\042" };
44 case QUEST_ERR_FAILED_CAIS: return { "QUEST_ERR_FAILED_CAIS", "QUEST_ERR_FAILED_CAIS", "\042You cannot complete quests once you have reached tired time\042" };
45 case QUEST_ERR_ALREADY_DONE_DAILY: return { "QUEST_ERR_ALREADY_DONE_DAILY", "QUEST_ERR_ALREADY_DONE_DAILY", "\042You have completed that daily quest today.\042" };
46 case QUEST_ERR_FAILED_SPELL: return { "QUEST_ERR_FAILED_SPELL", "QUEST_ERR_FAILED_SPELL", "\042You haven't learned the required spell.\042" };
47 case QUEST_ERR_HAS_IN_PROGRESS: return { "QUEST_ERR_HAS_IN_PROGRESS", "QUEST_ERR_HAS_IN_PROGRESS", "\042Progress Bar objective not completed\042" };
48 default: throw std::out_of_range("value");
49 }
50}
51
52template <>
54
55template <>
57{
58 switch (index)
59 {
60 case 0: return QUEST_ERR_NONE;
61 case 1: return QUEST_ERR_FAILED_LOW_LEVEL;
62 case 2: return QUEST_ERR_FAILED_WRONG_RACE;
63 case 3: return QUEST_ERR_ALREADY_DONE;
64 case 4: return QUEST_ERR_ONLY_ONE_TIMED;
65 case 5: return QUEST_ERR_ALREADY_ON1;
66 case 6: return QUEST_ERR_FAILED_EXPANSION;
67 case 7: return QUEST_ERR_ALREADY_ON2;
68 case 8: return QUEST_ERR_FAILED_MISSING_ITEMS;
70 case 10: return QUEST_ERR_FAILED_CAIS;
71 case 11: return QUEST_ERR_ALREADY_DONE_DAILY;
72 case 12: return QUEST_ERR_FAILED_SPELL;
73 case 13: return QUEST_ERR_HAS_IN_PROGRESS;
74 default: throw std::out_of_range("index");
75 }
76}
77
78template <>
80{
81 switch (value)
82 {
83 case QUEST_ERR_NONE: return 0;
84 case QUEST_ERR_FAILED_LOW_LEVEL: return 1;
85 case QUEST_ERR_FAILED_WRONG_RACE: return 2;
86 case QUEST_ERR_ALREADY_DONE: return 3;
87 case QUEST_ERR_ONLY_ONE_TIMED: return 4;
88 case QUEST_ERR_ALREADY_ON1: return 5;
89 case QUEST_ERR_FAILED_EXPANSION: return 6;
90 case QUEST_ERR_ALREADY_ON2: return 7;
91 case QUEST_ERR_FAILED_MISSING_ITEMS: return 8;
93 case QUEST_ERR_FAILED_CAIS: return 10;
94 case QUEST_ERR_ALREADY_DONE_DAILY: return 11;
95 case QUEST_ERR_FAILED_SPELL: return 12;
96 case QUEST_ERR_HAS_IN_PROGRESS: return 13;
97 default: throw std::out_of_range("value");
98 }
99}
100
101/******************************************************************\
102|* data for enum 'QuestPushReason' in 'QuestDef.h' auto-generated *|
103\******************************************************************/
104template <>
106{
107 switch (value)
108 {
109 case QuestPushReason::Success: return { "Success", "Success", "\042Sharing quest with %s...\042" };
110 case QuestPushReason::Invalid: return { "Invalid", "Invalid", "\042%s is not eligible for that quest\042" };
111 case QuestPushReason::InvalidToRecipient: return { "InvalidToRecipient", "InvalidToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are not eligible for that quest.\042" };
112 case QuestPushReason::Accepted: return { "Accepted", "Accepted", "\042%s has accepted your quest\042" };
113 case QuestPushReason::Declined: return { "Declined", "Declined", "\042%s has declined your quest\042" };
114 case QuestPushReason::Busy: return { "Busy", "Busy", "\042%s is busy\042" };
115 case QuestPushReason::Dead: return { "Dead", "Dead", "\042%s is dead.\042" };
116 case QuestPushReason::DeadToRecipient: return { "DeadToRecipient", "DeadToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are dead.\042" };
117 case QuestPushReason::LogFull: return { "LogFull", "LogFull", "\042%s's quest log is full\042" };
118 case QuestPushReason::LogFullToRecipient: return { "LogFullToRecipient", "LogFullToRecipient", "\042%s's attempt to share quest \042%s\042 failed. Your quest log is full.\042" };
119 case QuestPushReason::OnQuest: return { "OnQuest", "OnQuest", "\042%s is already on that quest\042" };
120 case QuestPushReason::OnQuestToRecipient: return { "OnQuestToRecipient", "OnQuestToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are already on that quest.\042" };
121 case QuestPushReason::AlreadyDone: return { "AlreadyDone", "AlreadyDone", "\042%s has completed that quest\042" };
122 case QuestPushReason::AlreadyDoneToRecipient: return { "AlreadyDoneToRecipient", "AlreadyDoneToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You have completed that quest.\042" };
123 case QuestPushReason::NotDaily: return { "NotDaily", "NotDaily", "\042That quest cannot be shared today\042" };
124 case QuestPushReason::TimerExpired: return { "TimerExpired", "TimerExpired", "\042Quest sharing timer has expired\042" };
125 case QuestPushReason::NotInParty: return { "NotInParty", "NotInParty", "\042You are not in a party\042" };
126 case QuestPushReason::DifferentServerDaily: return { "DifferentServerDaily", "DifferentServerDaily", "\042%s is not eligible for that quest today\042" };
127 case QuestPushReason::DifferentServerDailyToRecipient: return { "DifferentServerDailyToRecipient", "DifferentServerDailyToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are not eligible for that quest today.\042" };
128 case QuestPushReason::NotAllowed: return { "NotAllowed", "NotAllowed", "\042That quest cannot be shared\042" };
129 case QuestPushReason::Prerequisite: return { "Prerequisite", "Prerequisite", "\042%s hasn't completed all of the prerequisite quests required for that quest.\042" };
130 case QuestPushReason::PrerequisiteToRecipient: return { "PrerequisiteToRecipient", "PrerequisiteToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You must complete all of the prerequisite quests first.\042" };
131 case QuestPushReason::LowLevel: return { "LowLevel", "LowLevel", "\042%s is too low level for that quest.\042" };
132 case QuestPushReason::LowLevelToRecipient: return { "LowLevelToRecipient", "LowLevelToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are too low level for that quest.\042" };
133 case QuestPushReason::HighLevel: return { "HighLevel", "HighLevel", "\042%s is too high level for that quest.\042" };
134 case QuestPushReason::HighLevelToRecipient: return { "HighLevelToRecipient", "HighLevelToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are too high level for that quest.\042" };
135 case QuestPushReason::Class: return { "Class", "Class", "\042%s is the wrong class for that quest.\042" };
136 case QuestPushReason::ClassToRecipient: return { "ClassToRecipient", "ClassToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are the wrong class for that quest.\042" };
137 case QuestPushReason::Race: return { "Race", "Race", "\042%s is the wrong race for that quest.\042" };
138 case QuestPushReason::RaceToRecipient: return { "RaceToRecipient", "RaceToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are the wrong race for that quest.\042" };
139 case QuestPushReason::LowFaction: return { "LowFaction", "LowFaction", "\042%s's reputation is too low for that quest.\042" };
140 case QuestPushReason::LowFactionToRecipient: return { "LowFactionToRecipient", "LowFactionToRecipient", "\042%s's attempt to share quest \042%s\042 failed. Your reputation is too low for that quest.\042" };
141 case QuestPushReason::Expansion: return { "Expansion", "Expansion", "\042%s doesn't own the required expansion for that quest.\042" };
142 case QuestPushReason::ExpansionToRecipient: return { "ExpansionToRecipient", "ExpansionToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You do not own the required expansion for that quest.\042" };
143 case QuestPushReason::NotGarrisonOwner: return { "NotGarrisonOwner", "NotGarrisonOwner", "\042%s must own a garrison to accept that quest.\042" };
144 case QuestPushReason::NotGarrisonOwnerToRecipient: return { "NotGarrisonOwnerToRecipient", "NotGarrisonOwnerToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You must own a garrison to accept that quest.\042" };
145 case QuestPushReason::WrongCovenant: return { "WrongCovenant", "WrongCovenant", "\042%s is in the wrong covenant for that quest.\042" };
146 case QuestPushReason::WrongCovenantToRecipient: return { "WrongCovenantToRecipient", "WrongCovenantToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are in the wrong covenant for that quest.\042" };
147 case QuestPushReason::NewPlayerExperience: return { "NewPlayerExperience", "NewPlayerExperience", "\042%s must complete Exile's Reach to accept that quest.\042" };
148 case QuestPushReason::NewPlayerExperienceToRecipient: return { "NewPlayerExperienceToRecipient", "NewPlayerExperienceToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You must complete Exile's Reach to accept that quest.\042" };
149 case QuestPushReason::WrongFaction: return { "WrongFaction", "WrongFaction", "\042%s is the wrong faction for that quest.\042" };
150 case QuestPushReason::WrongFactionToRecipient: return { "WrongFactionToRecipient", "WrongFactionToRecipient", "\042%s's attempt to share quest \042%s\042 failed. You are the wrong faction for that quest.\042" };
151 default: throw std::out_of_range("value");
152 }
153}
154
155template <>
157
158template <>
160{
161 switch (index)
162 {
163 case 0: return QuestPushReason::Success;
164 case 1: return QuestPushReason::Invalid;
166 case 3: return QuestPushReason::Accepted;
167 case 4: return QuestPushReason::Declined;
168 case 5: return QuestPushReason::Busy;
169 case 6: return QuestPushReason::Dead;
171 case 8: return QuestPushReason::LogFull;
173 case 10: return QuestPushReason::OnQuest;
175 case 12: return QuestPushReason::AlreadyDone;
177 case 14: return QuestPushReason::NotDaily;
178 case 15: return QuestPushReason::TimerExpired;
179 case 16: return QuestPushReason::NotInParty;
182 case 19: return QuestPushReason::NotAllowed;
183 case 20: return QuestPushReason::Prerequisite;
185 case 22: return QuestPushReason::LowLevel;
187 case 24: return QuestPushReason::HighLevel;
189 case 26: return QuestPushReason::Class;
190 case 27: return QuestPushReason::ClassToRecipient;
191 case 28: return QuestPushReason::Race;
192 case 29: return QuestPushReason::RaceToRecipient;
193 case 30: return QuestPushReason::LowFaction;
195 case 32: return QuestPushReason::Expansion;
197 case 34: return QuestPushReason::NotGarrisonOwner;
199 case 36: return QuestPushReason::WrongCovenant;
203 case 40: return QuestPushReason::WrongFaction;
205 default: throw std::out_of_range("index");
206 }
207}
208
209template <>
211{
212 switch (value)
213 {
214 case QuestPushReason::Success: return 0;
215 case QuestPushReason::Invalid: return 1;
217 case QuestPushReason::Accepted: return 3;
218 case QuestPushReason::Declined: return 4;
219 case QuestPushReason::Busy: return 5;
220 case QuestPushReason::Dead: return 6;
222 case QuestPushReason::LogFull: return 8;
224 case QuestPushReason::OnQuest: return 10;
226 case QuestPushReason::AlreadyDone: return 12;
228 case QuestPushReason::NotDaily: return 14;
229 case QuestPushReason::TimerExpired: return 15;
230 case QuestPushReason::NotInParty: return 16;
233 case QuestPushReason::NotAllowed: return 19;
234 case QuestPushReason::Prerequisite: return 20;
236 case QuestPushReason::LowLevel: return 22;
238 case QuestPushReason::HighLevel: return 24;
240 case QuestPushReason::Class: return 26;
241 case QuestPushReason::ClassToRecipient: return 27;
242 case QuestPushReason::Race: return 28;
243 case QuestPushReason::RaceToRecipient: return 29;
244 case QuestPushReason::LowFaction: return 30;
246 case QuestPushReason::Expansion: return 32;
248 case QuestPushReason::NotGarrisonOwner: return 34;
250 case QuestPushReason::WrongCovenant: return 36;
254 case QuestPushReason::WrongFaction: return 40;
256 default: throw std::out_of_range("value");
257 }
258}
259}
#define TC_API_EXPORT
Definition: Define.h:92
QuestFailedReason
Definition: QuestDef.h:57
@ QUEST_ERR_ALREADY_DONE
Definition: QuestDef.h:61
@ QUEST_ERR_FAILED_EXPANSION
Definition: QuestDef.h:64
@ QUEST_ERR_FAILED_WRONG_RACE
Definition: QuestDef.h:60
@ QUEST_ERR_ALREADY_ON2
Definition: QuestDef.h:65
@ QUEST_ERR_ONLY_ONE_TIMED
Definition: QuestDef.h:62
@ QUEST_ERR_ALREADY_DONE_DAILY
Definition: QuestDef.h:69
@ QUEST_ERR_FAILED_LOW_LEVEL
Definition: QuestDef.h:59
@ QUEST_ERR_FAILED_NOT_ENOUGH_MONEY
Definition: QuestDef.h:67
@ QUEST_ERR_FAILED_MISSING_ITEMS
Definition: QuestDef.h:66
@ QUEST_ERR_NONE
Definition: QuestDef.h:58
@ QUEST_ERR_HAS_IN_PROGRESS
Definition: QuestDef.h:71
@ QUEST_ERR_FAILED_SPELL
Definition: QuestDef.h:70
@ QUEST_ERR_ALREADY_ON1
Definition: QuestDef.h:63
@ QUEST_ERR_FAILED_CAIS
Definition: QuestDef.h:68
QuestPushReason
Definition: QuestDef.h:76
@ NewPlayerExperienceToRecipient
@ DifferentServerDailyToRecipient
static size_t ToIndex(Enum index)
static EnumText ToString(Enum value)
static Enum FromIndex(size_t index)