TrinityCore
Loading...
Searching...
No Matches
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 INVALIDREASON_DONT_HAVE_REQ: return { "INVALIDREASON_DONT_HAVE_REQ", "INVALIDREASON_DONT_HAVE_REQ", "" };
35 case INVALIDREASON_QUEST_FAILED_LOW_LEVEL: return { "INVALIDREASON_QUEST_FAILED_LOW_LEVEL", "INVALIDREASON_QUEST_FAILED_LOW_LEVEL", "You are not high enough level for that quest." };
36 case INVALIDREASON_QUEST_FAILED_WRONG_RACE: return { "INVALIDREASON_QUEST_FAILED_WRONG_RACE", "INVALIDREASON_QUEST_FAILED_WRONG_RACE", "That quest is not available to your race." };
37 case INVALIDREASON_QUEST_ALREADY_DONE: return { "INVALIDREASON_QUEST_ALREADY_DONE", "INVALIDREASON_QUEST_ALREADY_DONE", "You have completed that quest." };
38 case INVALIDREASON_QUEST_ONLY_ONE_TIMED: return { "INVALIDREASON_QUEST_ONLY_ONE_TIMED", "INVALIDREASON_QUEST_ONLY_ONE_TIMED", "You can only be on one timed quest at a time." };
39 case INVALIDREASON_QUEST_ALREADY_ON: return { "INVALIDREASON_QUEST_ALREADY_ON", "INVALIDREASON_QUEST_ALREADY_ON", "You are already on that quest." };
40 case INVALIDREASON_QUEST_FAILED_EXPANSION: return { "INVALIDREASON_QUEST_FAILED_EXPANSION", "INVALIDREASON_QUEST_FAILED_EXPANSION", "This quest requires an expansion enabled account." };
41 case INVALIDREASON_QUEST_ALREADY_ON2: return { "INVALIDREASON_QUEST_ALREADY_ON2", "INVALIDREASON_QUEST_ALREADY_ON2", "You are already on that quest." };
42 case INVALIDREASON_QUEST_FAILED_MISSING_ITEMS: return { "INVALIDREASON_QUEST_FAILED_MISSING_ITEMS", "INVALIDREASON_QUEST_FAILED_MISSING_ITEMS", "You don't have the required items with you. Check storage." };
43 case INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY: return { "INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY", "INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY", "You don't have enough money for that quest." };
44 case INVALIDREASON_DAILY_QUESTS_REMAINING: return { "INVALIDREASON_DAILY_QUESTS_REMAINING", "INVALIDREASON_DAILY_QUESTS_REMAINING", "You have already completed 25 daily quests today." };
45 case INVALIDREASON_QUEST_FAILED_CAIS: return { "INVALIDREASON_QUEST_FAILED_CAIS", "INVALIDREASON_QUEST_FAILED_CAIS", "You cannot complete quests once you have reached tired time." };
46 case INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY: return { "INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY", "INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY", "You have completed that daily quest today." };
47 default: throw std::out_of_range("value");
48 }
49}
50
51template <>
53
54template <>
56{
57 switch (index)
58 {
59 case 0: return INVALIDREASON_DONT_HAVE_REQ;
64 case 5: return INVALIDREASON_QUEST_ALREADY_ON;
70 case 11: return INVALIDREASON_QUEST_FAILED_CAIS;
72 default: throw std::out_of_range("index");
73 }
74}
75
76template <>
78{
79 switch (value)
80 {
81 case INVALIDREASON_DONT_HAVE_REQ: return 0;
86 case INVALIDREASON_QUEST_ALREADY_ON: return 5;
92 case INVALIDREASON_QUEST_FAILED_CAIS: return 11;
94 default: throw std::out_of_range("value");
95 }
96}
97
98/*********************************************************************\
99|* data for enum 'QuestShareMessages' in 'QuestDef.h' auto-generated *|
100\*********************************************************************/
101template <>
103{
104 switch (value)
105 {
106 case QUEST_PARTY_MSG_SHARING_QUEST: return { "QUEST_PARTY_MSG_SHARING_QUEST", "QUEST_PARTY_MSG_SHARING_QUEST", "" };
107 case QUEST_PARTY_MSG_CANT_TAKE_QUEST: return { "QUEST_PARTY_MSG_CANT_TAKE_QUEST", "QUEST_PARTY_MSG_CANT_TAKE_QUEST", "" };
108 case QUEST_PARTY_MSG_ACCEPT_QUEST: return { "QUEST_PARTY_MSG_ACCEPT_QUEST", "QUEST_PARTY_MSG_ACCEPT_QUEST", "" };
109 case QUEST_PARTY_MSG_DECLINE_QUEST: return { "QUEST_PARTY_MSG_DECLINE_QUEST", "QUEST_PARTY_MSG_DECLINE_QUEST", "" };
110 case QUEST_PARTY_MSG_BUSY: return { "QUEST_PARTY_MSG_BUSY", "QUEST_PARTY_MSG_BUSY", "" };
111 case QUEST_PARTY_MSG_LOG_FULL: return { "QUEST_PARTY_MSG_LOG_FULL", "QUEST_PARTY_MSG_LOG_FULL", "" };
112 case QUEST_PARTY_MSG_HAVE_QUEST: return { "QUEST_PARTY_MSG_HAVE_QUEST", "QUEST_PARTY_MSG_HAVE_QUEST", "" };
113 case QUEST_PARTY_MSG_FINISH_QUEST: return { "QUEST_PARTY_MSG_FINISH_QUEST", "QUEST_PARTY_MSG_FINISH_QUEST", "" };
114 case QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY: return { "QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY", "QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY", "" };
115 case QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED: return { "QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED", "QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED", "" };
116 case QUEST_PARTY_MSG_NOT_IN_PARTY: return { "QUEST_PARTY_MSG_NOT_IN_PARTY", "QUEST_PARTY_MSG_NOT_IN_PARTY", "" };
117 case QUEST_PARTY_MSG_NOT_ELIGIBLE_TODAY: return { "QUEST_PARTY_MSG_NOT_ELIGIBLE_TODAY", "QUEST_PARTY_MSG_NOT_ELIGIBLE_TODAY", "" };
118 default: throw std::out_of_range("value");
119 }
120}
121
122template <>
124
125template <>
127{
128 switch (index)
129 {
130 case 0: return QUEST_PARTY_MSG_SHARING_QUEST;
131 case 1: return QUEST_PARTY_MSG_CANT_TAKE_QUEST;
132 case 2: return QUEST_PARTY_MSG_ACCEPT_QUEST;
133 case 3: return QUEST_PARTY_MSG_DECLINE_QUEST;
134 case 4: return QUEST_PARTY_MSG_BUSY;
135 case 5: return QUEST_PARTY_MSG_LOG_FULL;
136 case 6: return QUEST_PARTY_MSG_HAVE_QUEST;
137 case 7: return QUEST_PARTY_MSG_FINISH_QUEST;
140 case 10: return QUEST_PARTY_MSG_NOT_IN_PARTY;
142 default: throw std::out_of_range("index");
143 }
144}
145
146template <>
148{
149 switch (value)
150 {
151 case QUEST_PARTY_MSG_SHARING_QUEST: return 0;
152 case QUEST_PARTY_MSG_CANT_TAKE_QUEST: return 1;
153 case QUEST_PARTY_MSG_ACCEPT_QUEST: return 2;
154 case QUEST_PARTY_MSG_DECLINE_QUEST: return 3;
155 case QUEST_PARTY_MSG_BUSY: return 4;
156 case QUEST_PARTY_MSG_LOG_FULL: return 5;
157 case QUEST_PARTY_MSG_HAVE_QUEST: return 6;
158 case QUEST_PARTY_MSG_FINISH_QUEST: return 7;
161 case QUEST_PARTY_MSG_NOT_IN_PARTY: return 10;
163 default: throw std::out_of_range("value");
164 }
165}
166}
#define TC_API_EXPORT
Definition Define.h:89
QuestFailedReason
Definition QuestDef.h:50
@ INVALIDREASON_DONT_HAVE_REQ
Definition QuestDef.h:51
@ INVALIDREASON_QUEST_FAILED_CAIS
Definition QuestDef.h:62
@ INVALIDREASON_QUEST_ALREADY_ON2
Definition QuestDef.h:58
@ INVALIDREASON_QUEST_ALREADY_ON
Definition QuestDef.h:56
@ INVALIDREASON_QUEST_FAILED_MISSING_ITEMS
Definition QuestDef.h:59
@ INVALIDREASON_QUEST_FAILED_WRONG_RACE
Definition QuestDef.h:53
@ INVALIDREASON_DAILY_QUEST_COMPLETED_TODAY
Definition QuestDef.h:63
@ INVALIDREASON_QUEST_ALREADY_DONE
Definition QuestDef.h:54
@ INVALIDREASON_QUEST_ONLY_ONE_TIMED
Definition QuestDef.h:55
@ INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY
Definition QuestDef.h:60
@ INVALIDREASON_QUEST_FAILED_LOW_LEVEL
Definition QuestDef.h:52
@ INVALIDREASON_DAILY_QUESTS_REMAINING
Definition QuestDef.h:61
@ INVALIDREASON_QUEST_FAILED_EXPANSION
Definition QuestDef.h:57
QuestShareMessages
Definition QuestDef.h:68
@ QUEST_PARTY_MSG_FINISH_QUEST
Definition QuestDef.h:76
@ QUEST_PARTY_MSG_CANT_TAKE_QUEST
Definition QuestDef.h:70
@ QUEST_PARTY_MSG_NOT_ELIGIBLE_TODAY
Definition QuestDef.h:80
@ QUEST_PARTY_MSG_BUSY
Definition QuestDef.h:73
@ QUEST_PARTY_MSG_ACCEPT_QUEST
Definition QuestDef.h:71
@ QUEST_PARTY_MSG_HAVE_QUEST
Definition QuestDef.h:75
@ QUEST_PARTY_MSG_SHARING_TIMER_EXPIRED
Definition QuestDef.h:78
@ QUEST_PARTY_MSG_CANT_BE_SHARED_TODAY
Definition QuestDef.h:77
@ QUEST_PARTY_MSG_SHARING_QUEST
Definition QuestDef.h:69
@ QUEST_PARTY_MSG_LOG_FULL
Definition QuestDef.h:74
@ QUEST_PARTY_MSG_NOT_IN_PARTY
Definition QuestDef.h:79
@ QUEST_PARTY_MSG_DECLINE_QUEST
Definition QuestDef.h:72
static size_t ToIndex(Enum index)
static EnumText ToString(Enum value)
static Enum FromIndex(size_t index)