mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Util: Redesign SmartEnum to properly work for large enums (>64 entries) and play nice with IDEs (PR #22768)
This commit is contained in:
144
contrib/enumutils_describe.py
Normal file
144
contrib/enumutils_describe.py
Normal file
@@ -0,0 +1,144 @@
|
||||
from re import compile, MULTILINE
|
||||
from sys import argv, stdout, stderr
|
||||
from os import walk, getcwd
|
||||
from datetime import datetime
|
||||
|
||||
notice = ('''/*
|
||||
* Copyright (C) 2008-%d TrinityCore <https://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
''' % datetime.now().year)
|
||||
|
||||
if not getcwd().endswith('src'):
|
||||
print('Run this from the src directory!')
|
||||
print('(Invoke as \'python ../contrib/enumutils_describe.py\')')
|
||||
exit(1)
|
||||
|
||||
EnumPattern = compile(r'//\s*EnumUtils: DESCRIBE THIS\s+enum\s+([0-9A-Za-z]+)[^\n]*\s*{([^}]+)};')
|
||||
EnumValuesPattern = compile(r'\s+[^,]+[^\n]*')
|
||||
EnumValueNamePattern = compile(r'^\s*([a-zA-Z0-9_]+)', flags=MULTILINE)
|
||||
EnumValueCommentPattern = compile(r'//[ \t]*([^\n]+)$')
|
||||
CommentMatchFormat = compile(r'^(((TITLE +(.+?))|(DESCRIPTION +(.+?))) *){1,2}$')
|
||||
CommentSkipFormat = compile(r'^SKIP *$')
|
||||
|
||||
def strescape(str):
|
||||
res = ''
|
||||
for char in str:
|
||||
if char in ('\\', '"') or not (32 <= ord(char) < 127):
|
||||
res += ('\\%03o' % ord(char))
|
||||
else:
|
||||
res += char
|
||||
return '"' + res + '"'
|
||||
|
||||
def processFile(path, filename):
|
||||
input = open('%s/%s.h' % (path, filename),'r')
|
||||
if input is None:
|
||||
print('Failed to open %s.h' % filename)
|
||||
return
|
||||
|
||||
file = input.read()
|
||||
|
||||
enums = []
|
||||
for enum in EnumPattern.finditer(file):
|
||||
name = enum.group(1)
|
||||
values = []
|
||||
for value in EnumValuesPattern.finditer(enum.group(2)):
|
||||
valueData = value.group(0)
|
||||
|
||||
valueNameMatch = EnumValueNamePattern.search(valueData)
|
||||
if valueNameMatch is None:
|
||||
print('Name of value not found: %s' % repr(valueData))
|
||||
continue
|
||||
valueName = valueNameMatch.group(1)
|
||||
|
||||
valueCommentMatch = EnumValueCommentPattern.search(valueData)
|
||||
valueComment = None
|
||||
if valueCommentMatch:
|
||||
valueComment = valueCommentMatch.group(1)
|
||||
|
||||
valueTitle = None
|
||||
valueDescription = None
|
||||
|
||||
if valueComment is not None:
|
||||
if CommentSkipFormat.match(valueComment) is not None:
|
||||
continue
|
||||
commentMatch = CommentMatchFormat.match(valueComment)
|
||||
if commentMatch is not None:
|
||||
valueTitle = commentMatch.group(4)
|
||||
valueDescription = commentMatch.group(6)
|
||||
else:
|
||||
valueDescription = valueComment
|
||||
|
||||
if valueTitle is None:
|
||||
valueTitle = valueName
|
||||
if valueDescription is None:
|
||||
valueDescription = ''
|
||||
|
||||
values.append((valueName, valueTitle, valueDescription))
|
||||
|
||||
enums.append((name, values))
|
||||
print('%s.h: Enum %s parsed with %d values' % (filename, name, len(values)))
|
||||
|
||||
if not enums:
|
||||
return
|
||||
|
||||
print('Done parsing %s.h (in %s)\n' % (filename, path))
|
||||
output = open('%s/enuminfo_%s.cpp' % (path, filename), 'w')
|
||||
if output is None:
|
||||
print('Failed to create enuminfo_%s.cpp' % filename)
|
||||
return
|
||||
|
||||
# write output file
|
||||
output.write(notice)
|
||||
output.write('#include "%s.h"\n' % filename)
|
||||
output.write('#include "Define.h"\n')
|
||||
output.write('#include "SmartEnum.h"\n')
|
||||
output.write('#include <stdexcept>\n')
|
||||
output.write('\n')
|
||||
for name, values in enums:
|
||||
tag = ('data for enum \'%s\' in \'%s.h\' auto-generated' % (name, filename))
|
||||
output.write('/*' + ('*'*(len(tag)+2)) + '*\\\n')
|
||||
output.write('|* ' + tag + ' *|\n')
|
||||
output.write('\\*' + ('*'*(len(tag)+2)) + '*/\n')
|
||||
output.write('template <>\n')
|
||||
output.write('TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<%s>::ToString(%s value)\n' % (name, name))
|
||||
output.write('{\n')
|
||||
output.write(' switch (value)\n')
|
||||
output.write(' {\n')
|
||||
for label, title, description in values:
|
||||
output.write(' case %s: return {%s, %s, %s};\n' % (label, strescape(label), strescape(title), strescape(description)))
|
||||
output.write(' default: throw std::out_of_range("value");\n')
|
||||
output.write(' }\n')
|
||||
output.write('}\n')
|
||||
output.write('template <>\n');
|
||||
output.write('TC_API_EXPORT size_t Trinity::Impl::EnumUtils<%s>::Count() { return %d; }\n' % (name, len(values)))
|
||||
output.write('template <>\n');
|
||||
output.write('TC_API_EXPORT %s Trinity::Impl::EnumUtils<%s>::FromIndex(size_t index)\n' % (name, name))
|
||||
output.write('{\n')
|
||||
output.write(' switch (index)\n')
|
||||
output.write(' {\n')
|
||||
for i in range(len(values)):
|
||||
output.write(' case %d: return %s;\n' % (i, values[i][0]))
|
||||
output.write(' default: throw std::out_of_range("index");\n')
|
||||
output.write(' }\n')
|
||||
output.write('}\n\n')
|
||||
|
||||
FilenamePattern = compile(r'^(.+).h$')
|
||||
for root, dirs, files in walk('.'):
|
||||
for n in files:
|
||||
nameMatch = FilenamePattern.match(n)
|
||||
if nameMatch is not None:
|
||||
processFile(root, nameMatch.group(1))
|
||||
@@ -22,7 +22,6 @@ if (SERVERS OR TOOLS)
|
||||
add_subdirectory(valgrind)
|
||||
add_subdirectory(openssl)
|
||||
add_subdirectory(jemalloc)
|
||||
add_subdirectory(smart_enum)
|
||||
endif()
|
||||
|
||||
if (SERVERS)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
# Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
add_library(smart_enum INTERFACE)
|
||||
|
||||
target_include_directories(smart_enum
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
@@ -1,23 +0,0 @@
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,465 +0,0 @@
|
||||
|
||||
|
||||
// Copyright Jarda Flieger 2016.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef SMART_ENUM_HEADER_INCLUDED
|
||||
#define SMART_ENUM_HEADER_INCLUDED
|
||||
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
#include <tuple>
|
||||
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
|
||||
#include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
#include <boost/preprocessor/logical/not.hpp>
|
||||
#include <boost/preprocessor/punctuation/remove_parens.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/tuple/push_back.hpp>
|
||||
|
||||
#define SMART_ENUM(...) \
|
||||
SMART_ENUM_IMPL(, __VA_ARGS__)
|
||||
|
||||
#define SMART_ENUM_CLASS(...) \
|
||||
SMART_ENUM_IMPL(class, __VA_ARGS__)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define SMART_ENUM_IMPL(CLASS, ...) \
|
||||
BOOST_PP_CAT \
|
||||
( \
|
||||
BOOST_PP_OVERLOAD(SMART_ENUM_IMPL_, __VA_ARGS__)(CLASS, __VA_ARGS__), \
|
||||
BOOST_PP_EMPTY() \
|
||||
)
|
||||
#else
|
||||
#define SMART_ENUM_IMPL(CLASS, ...) \
|
||||
BOOST_PP_OVERLOAD(SMART_ENUM_IMPL_, __VA_ARGS__)(CLASS, __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#define SMART_ENUM_IMPL_2(CLASS, NAME, MEMBERS) \
|
||||
SMART_ENUM_IMPL_DEFINITION(CLASS, _, NAME, MEMBERS)
|
||||
|
||||
#define SMART_ENUM_IMPL_3(CLASS, NAMESPACES, NAME, MEMBERS) \
|
||||
SMART_ENUM_IMPL_DEFINITION(CLASS, SMART_ENUM_IMPL_ARG_TO_TUPLE(NAMESPACES), NAME, MEMBERS)
|
||||
|
||||
#define SMART_ENUM_IMPL_DEFINITION(CLASS, NAMESPACES, NAME, MEMBERS) \
|
||||
SMART_ENUM_IMPL_DEFINITION_1 \
|
||||
( \
|
||||
CLASS, NAMESPACES, SMART_ENUM_IMPL_ARG_TO_TUPLE(NAME), (SMART_ENUM_IMPL_ARGS_TO_TUPLES(MEMBERS)) \
|
||||
)
|
||||
|
||||
#define SMART_ENUM_IMPL_DEFINITION_1(CLASS, NAMESPACES, NAME, MEMBERS) \
|
||||
SMART_ENUM_IMPL_REPEAT(NAMESPACE_START, NAMESPACES) \
|
||||
enum CLASS SMART_ENUM_IMPL_NAME_SIZE(NAME) \
|
||||
{ \
|
||||
SMART_ENUM_IMPL_MEMBER_DEFINITIONS(MEMBERS) \
|
||||
}; \
|
||||
SMART_ENUM_IMPL_REPEAT(NAMESPACE_END, NAMESPACES) \
|
||||
\
|
||||
SMART_ENUM_IMPL_TRAITS(NAMESPACES, BOOST_PP_TUPLE_ELEM(0, NAME), MEMBERS)
|
||||
|
||||
#define SMART_ENUM_IMPL_NAME_SIZE(NAME_SIZE) \
|
||||
BOOST_PP_TUPLE_ELEM(0, NAME_SIZE) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
BOOST_PP_DEC(BOOST_PP_TUPLE_SIZE(NAME_SIZE)), \
|
||||
SMART_ENUM_IMPL_NAME_SIZE_1, BOOST_PP_TUPLE_EAT(1) \
|
||||
) \
|
||||
NAME_SIZE
|
||||
|
||||
#define SMART_ENUM_IMPL_NAME_SIZE_1(NAME, SIZE) \
|
||||
: SIZE
|
||||
|
||||
// traits
|
||||
#define SMART_ENUM_IMPL_TRAITS(NAMESPACES, NAME, MEMBERS) \
|
||||
SMART_ENUM_IMPL_TRAITS_1 \
|
||||
( \
|
||||
SMART_ENUM_IMPL_FULL_NAME(NAMESPACES, NAME), \
|
||||
SMART_ENUM_IMPL_FULL_NAME_STRING(NAMESPACES, NAME), \
|
||||
NAME, \
|
||||
MEMBERS \
|
||||
)
|
||||
|
||||
#define SMART_ENUM_IMPL_TRAITS_1(FULL_NAME, FULL_NAME_STRING, NAME, MEMBERS) \
|
||||
namespace smart_enum \
|
||||
{ \
|
||||
template<> struct enum_traits<FULL_NAME> : detail::enum_traits_base<FULL_NAME> \
|
||||
{ \
|
||||
using type = FULL_NAME; \
|
||||
using data_type = SMART_ENUM_IMPL_DATA_TYPE(BOOST_PP_TUPLE_ELEM(0, MEMBERS)); \
|
||||
\
|
||||
static constexpr const char *name = BOOST_PP_STRINGIZE(NAME); \
|
||||
static constexpr const char *full_name = FULL_NAME_STRING; \
|
||||
\
|
||||
static constexpr std::size_t count = BOOST_PP_TUPLE_SIZE(MEMBERS); \
|
||||
\
|
||||
SMART_ENUM_IMPL_DATA(FULL_NAME, MEMBERS) \
|
||||
SMART_ENUM_IMPL_FROM_STRING(FULL_NAME, MEMBERS) \
|
||||
SMART_ENUM_IMPL_INDEX_OF(FULL_NAME, MEMBERS) \
|
||||
SMART_ENUM_IMPL_TO_STRING(FULL_NAME, MEMBERS) \
|
||||
SMART_ENUM_IMPL_VALUE_OF(FULL_NAME, MEMBERS) \
|
||||
}; \
|
||||
}
|
||||
|
||||
// full name
|
||||
#define SMART_ENUM_IMPL_FULL_NAME(NAMESPACES, NAME) \
|
||||
SMART_ENUM_IMPL_REPEAT(FULL_NAME_1, NAMESPACES) NAME
|
||||
|
||||
#define SMART_ENUM_IMPL_FULL_NAME_1(NAMESPACE) \
|
||||
NAMESPACE ::
|
||||
|
||||
#define SMART_ENUM_IMPL_FULL_NAME_STRING(NAMESPACES, NAME) \
|
||||
SMART_ENUM_IMPL_REPEAT(FULL_NAME_STRING_1, NAMESPACES) BOOST_PP_STRINGIZE(NAME)
|
||||
|
||||
#define SMART_ENUM_IMPL_FULL_NAME_STRING_1(NAMESPACE) \
|
||||
BOOST_PP_STRINGIZE(NAMESPACE) "::"
|
||||
|
||||
// data
|
||||
#define SMART_ENUM_IMPL_DATA(PREFIX, MEMBERS) \
|
||||
static constexpr data_type data(PREFIX value) \
|
||||
{ \
|
||||
switch(value) \
|
||||
{ \
|
||||
SMART_ENUM_IMPL_REPEAT_MEMBERS(PREFIX, MEMBERS, MEMBER_DATA) \
|
||||
} \
|
||||
\
|
||||
return {}; \
|
||||
}
|
||||
|
||||
#define SMART_ENUM_IMPL_MEMBER_DATA(PREFIX, NAME, MEMBER, INDEX) \
|
||||
case PREFIX :: NAME: \
|
||||
return EnumText \
|
||||
SMART_ENUM_IMPL_MEMBER_DATA_1 \
|
||||
( \
|
||||
SMART_ENUM_IMPL_TUPLE_LAST_ELEMENT(MEMBER) \
|
||||
) \
|
||||
;
|
||||
|
||||
#define SMART_ENUM_IMPL_MEMBER_DATA_1(DATA) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_BEGIN_PARENS(DATA), DATA, () \
|
||||
)
|
||||
|
||||
#define SMART_ENUM_IMPL_DATA_TYPE(MEMBER) \
|
||||
EnumText
|
||||
|
||||
// member definitions
|
||||
#define SMART_ENUM_IMPL_MEMBER_DEFINITIONS(MEMBERS) \
|
||||
SMART_ENUM_IMPL_ENUM_MEMBERS(_, MEMBERS, MEMBER_DEFINITION)
|
||||
|
||||
#define SMART_ENUM_IMPL_MEMBER_DEFINITION(PREFIX, NAME, MEMBER, INDEX) \
|
||||
NAME \
|
||||
SMART_ENUM_IMPL_MEMBER_DEFINITION_1 \
|
||||
( \
|
||||
BOOST_PP_TUPLE_ELEM(1, BOOST_PP_TUPLE_PUSH_BACK(MEMBER, ())) \
|
||||
)
|
||||
|
||||
#define SMART_ENUM_IMPL_MEMBER_DEFINITION_1(VALUE) \
|
||||
BOOST_PP_EXPR_IIF \
|
||||
( \
|
||||
BOOST_PP_NOT(BOOST_PP_IS_BEGIN_PARENS(VALUE)), = VALUE \
|
||||
)
|
||||
|
||||
// from_string
|
||||
#define SMART_ENUM_IMPL_FROM_STRING(PREFIX, MEMBERS) \
|
||||
static PREFIX from_string(const char *s) \
|
||||
{ \
|
||||
return SMART_ENUM_IMPL_REPEAT_MEMBERS(PREFIX, MEMBERS, MEMBER_FROM_STRING) throw std::invalid_argument("s"); \
|
||||
}
|
||||
|
||||
#define SMART_ENUM_IMPL_MEMBER_FROM_STRING(PREFIX, NAME, MEMBER, INDEX) \
|
||||
!std::strcmp(s, BOOST_PP_STRINGIZE(NAME)) ? PREFIX :: NAME :
|
||||
|
||||
// index_of
|
||||
#define SMART_ENUM_IMPL_INDEX_OF(PREFIX, MEMBERS) \
|
||||
static constexpr std::size_t index_of(PREFIX value) \
|
||||
{ \
|
||||
return SMART_ENUM_IMPL_REPEAT_MEMBERS(PREFIX, MEMBERS, MEMBER_INDEX_OF) throw std::invalid_argument("value"); \
|
||||
}
|
||||
|
||||
#define SMART_ENUM_IMPL_MEMBER_INDEX_OF(PREFIX, NAME, MEMBER, INDEX) \
|
||||
value == PREFIX :: NAME ? INDEX ## u :
|
||||
|
||||
// to_string
|
||||
#define SMART_ENUM_IMPL_TO_STRING(PREFIX, MEMBERS) \
|
||||
static constexpr const char *to_string(PREFIX value) \
|
||||
{ \
|
||||
switch(value) \
|
||||
{ \
|
||||
SMART_ENUM_IMPL_REPEAT_MEMBERS(PREFIX, MEMBERS, MEMBER_TO_STRING) \
|
||||
} \
|
||||
\
|
||||
return nullptr; \
|
||||
}
|
||||
|
||||
#define SMART_ENUM_IMPL_MEMBER_TO_STRING(PREFIX, NAME, MEMBER, INDEX) \
|
||||
case PREFIX :: NAME: \
|
||||
return BOOST_PP_STRINGIZE(NAME);
|
||||
|
||||
// value_of
|
||||
#define SMART_ENUM_IMPL_VALUE_OF(PREFIX, MEMBERS) \
|
||||
static constexpr PREFIX value_of(std::size_t index) \
|
||||
{ \
|
||||
return SMART_ENUM_IMPL_REPEAT_MEMBERS(PREFIX, MEMBERS, MEMBER_VALUE_OF) throw std::invalid_argument("index"); \
|
||||
}
|
||||
|
||||
#define SMART_ENUM_IMPL_MEMBER_VALUE_OF(PREFIX, NAME, MEMBER, INDEX) \
|
||||
index == INDEX ? PREFIX :: NAME :
|
||||
|
||||
// namespaces
|
||||
#define SMART_ENUM_IMPL_NAMESPACE_END(_) \
|
||||
}
|
||||
|
||||
#define SMART_ENUM_IMPL_NAMESPACE_START(NAMESPACE) \
|
||||
namespace NAMESPACE {
|
||||
|
||||
// utils
|
||||
#define SMART_ENUM_IMPL_ARG_TO_TUPLE(ARG) \
|
||||
(BOOST_PP_REMOVE_PARENS(ARG))
|
||||
|
||||
#define SMART_ENUM_IMPL_ARGS_TO_TUPLES(ARGS) \
|
||||
BOOST_PP_ENUM(BOOST_PP_TUPLE_SIZE(ARGS), SMART_ENUM_IMPL_ARGS_TO_TUPLES_1, ARGS)
|
||||
|
||||
#define SMART_ENUM_IMPL_ARGS_TO_TUPLES_1(_, INDEX, ARGS) \
|
||||
SMART_ENUM_IMPL_ARG_TO_TUPLE(BOOST_PP_TUPLE_ELEM(INDEX, ARGS))
|
||||
|
||||
#define SMART_ENUM_IMPL_REPEAT(MACRO, TUPLE) \
|
||||
BOOST_PP_EXPR_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_BEGIN_PARENS(TUPLE), \
|
||||
BOOST_PP_REPEAT(BOOST_PP_TUPLE_SIZE(TUPLE), SMART_ENUM_IMPL_REPEAT_1, (TUPLE, MACRO)) \
|
||||
)
|
||||
|
||||
#define SMART_ENUM_IMPL_REPEAT_1(_, INDEX, TUPLE_MACRO) \
|
||||
BOOST_PP_CAT(SMART_ENUM_IMPL_, BOOST_PP_TUPLE_ELEM(1, TUPLE_MACRO)) \
|
||||
(BOOST_PP_TUPLE_ELEM(INDEX, BOOST_PP_TUPLE_ELEM(0, TUPLE_MACRO)))
|
||||
|
||||
#define SMART_ENUM_IMPL_ENUM_MEMBERS(PREFIX, MEMBERS, MACRO) \
|
||||
BOOST_PP_ENUM(BOOST_PP_TUPLE_SIZE(MEMBERS), SMART_ENUM_IMPL_PROCESS_MEMBERS_1, (PREFIX, MEMBERS, MACRO))
|
||||
|
||||
#define SMART_ENUM_IMPL_REPEAT_MEMBERS(PREFIX, MEMBERS, MACRO) \
|
||||
BOOST_PP_REPEAT(BOOST_PP_TUPLE_SIZE(MEMBERS), SMART_ENUM_IMPL_PROCESS_MEMBERS_1, (PREFIX, MEMBERS, MACRO))
|
||||
|
||||
#define SMART_ENUM_IMPL_PROCESS_MEMBERS_1(_, INDEX, PREFIX_MEMBERS_MACRO) \
|
||||
SMART_ENUM_IMPL_PROCESS_MEMBERS_2 \
|
||||
( \
|
||||
BOOST_PP_TUPLE_ELEM(0, PREFIX_MEMBERS_MACRO), \
|
||||
BOOST_PP_TUPLE_ELEM(INDEX, BOOST_PP_TUPLE_ELEM(1, PREFIX_MEMBERS_MACRO)), \
|
||||
BOOST_PP_TUPLE_ELEM(2, PREFIX_MEMBERS_MACRO), \
|
||||
INDEX \
|
||||
)
|
||||
|
||||
#define SMART_ENUM_IMPL_PROCESS_MEMBERS_2(PREFIX, MEMBER, MACRO, INDEX) \
|
||||
BOOST_PP_CAT(SMART_ENUM_IMPL_, MACRO)(PREFIX, BOOST_PP_TUPLE_ELEM(0, MEMBER), MEMBER, INDEX)
|
||||
|
||||
#define SMART_ENUM_IMPL_TUPLE_LAST_ELEMENT(TUPLE) \
|
||||
BOOST_PP_TUPLE_ELEM(BOOST_PP_DEC(BOOST_PP_TUPLE_SIZE(TUPLE)), TUPLE)
|
||||
|
||||
namespace smart_enum
|
||||
{
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
class enum_iterator;
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
struct enum_range;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
struct enum_traits_base
|
||||
{
|
||||
static constexpr bool is_enum_class =
|
||||
std::integral_constant
|
||||
<
|
||||
bool, std::is_enum<Enum>::value && !std::is_convertible<Enum, int>::value
|
||||
>
|
||||
::value;
|
||||
};
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
struct enum_traits {};
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr enum_iterator<Enum> begin()
|
||||
{
|
||||
return enum_iterator<Enum>{enum_traits<Enum>::value_of(0)};
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
typename enum_traits<Enum>::data_type data(Enum value)
|
||||
{
|
||||
return enum_traits<Enum>::data(value);
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr enum_iterator<Enum> end()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr std::size_t count()
|
||||
{
|
||||
return enum_traits<Enum>::count;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
Enum from_string(const char *s)
|
||||
{
|
||||
return enum_traits<Enum>::from_string(s);
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr const char *full_name()
|
||||
{
|
||||
return enum_traits<Enum>::full_name;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr std::size_t index_of(Enum value)
|
||||
{
|
||||
return enum_traits<Enum>::index_of(value);
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr bool is_enum_class()
|
||||
{
|
||||
return enum_traits<Enum>::is_enum_class;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr const char *name()
|
||||
{
|
||||
return enum_traits<Enum>::name;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr enum_range<Enum> range()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr const char *to_string(Enum value)
|
||||
{
|
||||
return enum_traits<Enum>::to_string(value);
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
constexpr Enum value_of(std::size_t index)
|
||||
{
|
||||
return enum_traits<Enum>::value_of(index);
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
class enum_iterator
|
||||
{
|
||||
public:
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
using value_type = Enum;
|
||||
using pointer = Enum*;
|
||||
using reference = Enum&;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
|
||||
constexpr enum_iterator() : index_(count<Enum>()) {}
|
||||
constexpr explicit enum_iterator(Enum value) : index_(index_of<Enum>(value)) { }
|
||||
|
||||
constexpr bool operator==(const enum_iterator& other) const { return other.index_ == index_; }
|
||||
constexpr bool operator!=(const enum_iterator& other) const { return !operator==(other); }
|
||||
constexpr difference_type operator-(enum_iterator const& other) const { return index_ - other.index_; }
|
||||
constexpr bool operator<(const enum_iterator& other) const { return index_ < other.index_; }
|
||||
constexpr bool operator<=(const enum_iterator& other) const { return index_ <= other.index_; }
|
||||
constexpr bool operator>(const enum_iterator& other) const { return index_ > other.index_; }
|
||||
constexpr bool operator>=(const enum_iterator& other) const { return index_ >= other.index_; }
|
||||
|
||||
constexpr value_type operator[](difference_type d) const { return value_of<Enum>(index_ + d); }
|
||||
constexpr value_type operator*() const { return operator[](0); }
|
||||
|
||||
constexpr enum_iterator& operator+=(difference_type d) { index_ += d; return *this; }
|
||||
constexpr enum_iterator& operator++() { return operator+=(1); }
|
||||
constexpr enum_iterator operator++(int) { enum_iterator i = *this; operator++(); return i; }
|
||||
constexpr enum_iterator operator+(difference_type d) const { enum_iterator i = *this; i += d; return i; }
|
||||
|
||||
constexpr enum_iterator& operator-=(difference_type d) { index_ -= d; return *this; }
|
||||
constexpr enum_iterator& operator--() { return operator-=(1); }
|
||||
constexpr enum_iterator operator--(int) { enum_iterator i = *this; operator--(); return i; }
|
||||
constexpr enum_iterator operator-(difference_type d) const { enum_iterator i = *this; i -= d; return i; }
|
||||
|
||||
private:
|
||||
difference_type index_;
|
||||
};
|
||||
|
||||
template
|
||||
<
|
||||
typename Enum
|
||||
>
|
||||
struct enum_range
|
||||
{
|
||||
constexpr enum_iterator<Enum> begin() const
|
||||
{
|
||||
return smart_enum::begin<Enum>();
|
||||
}
|
||||
|
||||
constexpr enum_iterator<Enum> end() const
|
||||
{
|
||||
return smart_enum::end<Enum>();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -72,8 +72,7 @@ target_link_libraries(common
|
||||
openssl
|
||||
valgrind
|
||||
threads
|
||||
jemalloc
|
||||
smart_enum)
|
||||
jemalloc)
|
||||
|
||||
add_dependencies(common revision_data.h)
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ namespace Trinity
|
||||
class IteratorPair
|
||||
{
|
||||
public:
|
||||
IteratorPair() : _iterators() { }
|
||||
IteratorPair(iterator first, iterator second) : _iterators(first, second) { }
|
||||
IteratorPair(std::pair<iterator, iterator> iterators) : _iterators(iterators) { }
|
||||
constexpr IteratorPair() : _iterators() { }
|
||||
constexpr IteratorPair(iterator first, iterator second) : _iterators(first, second) { }
|
||||
constexpr IteratorPair(std::pair<iterator, iterator> iterators) : _iterators(iterators) { }
|
||||
|
||||
iterator begin() const { return _iterators.first; }
|
||||
iterator end() const { return _iterators.second; }
|
||||
constexpr iterator begin() const { return _iterators.first; }
|
||||
constexpr iterator end() const { return _iterators.second; }
|
||||
|
||||
private:
|
||||
std::pair<iterator, iterator> _iterators;
|
||||
|
||||
@@ -18,44 +18,98 @@
|
||||
#ifndef TRINITY_SMARTENUM_H
|
||||
#define TRINITY_SMARTENUM_H
|
||||
|
||||
#include "smart_enum.hpp"
|
||||
#include "IteratorPair.h"
|
||||
|
||||
struct EnumText
|
||||
{
|
||||
constexpr EnumText(char const* t = nullptr, char const* d = nullptr) : Title(t), Description(d ? d : t) {}
|
||||
EnumText(char const* c, char const* t, char const* d) : Constant(c), Title(t), Description(d) {}
|
||||
// Enum constant of the value
|
||||
char const* const Constant;
|
||||
// Human-readable title of the value
|
||||
char const* const Title;
|
||||
// Human-readable description of the value
|
||||
char const* const Description;
|
||||
|
||||
protected:
|
||||
constexpr EnumText(char const* n, EnumText e) : Title(e.Title ? e.Title : n), Description(e.Description ? e.Description : Title) {}
|
||||
};
|
||||
|
||||
struct FullEnumText : public EnumText
|
||||
namespace Trinity
|
||||
{
|
||||
constexpr FullEnumText(char const* constant, EnumText e) : EnumText(constant, e), Constant(constant) {}
|
||||
// Enum constant of the value
|
||||
char const* const Constant;
|
||||
};
|
||||
namespace Impl
|
||||
{
|
||||
template <typename Enum>
|
||||
struct EnumUtils
|
||||
{
|
||||
static size_t Count();
|
||||
static EnumText ToString(Enum value);
|
||||
static Enum FromIndex(size_t index);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
template <typename E>
|
||||
class EnumUtils
|
||||
{
|
||||
public:
|
||||
static constexpr auto Begin() { return smart_enum::begin<E>(); }
|
||||
static constexpr auto End() { return smart_enum::end<E>(); }
|
||||
static constexpr auto Iterate() { return smart_enum::range<E>(); }
|
||||
static constexpr FullEnumText ToString(E value)
|
||||
template <typename Enum>
|
||||
static size_t Count() { return Trinity::Impl::EnumUtils<Enum>::Count(); }
|
||||
template <typename Enum>
|
||||
static EnumText ToString(Enum value) { return Trinity::Impl::EnumUtils<Enum>::ToString(value); }
|
||||
template <typename Enum>
|
||||
static Enum FromIndex(size_t index) { return Trinity::Impl::EnumUtils<Enum>::FromIndex(index); }
|
||||
|
||||
template <typename Enum>
|
||||
class Iterator
|
||||
{
|
||||
return { smart_enum::to_string<E>(value), smart_enum::data<E>(value) };
|
||||
}
|
||||
static constexpr char const* ToConstant(E value) { return ToString(value).Constant; }
|
||||
static constexpr char const* ToTitle(E value) { return ToString(value).Title; }
|
||||
static constexpr char const* ToDescription(E value) { return ToString(value).Description; }
|
||||
public:
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
using value_type = Enum;
|
||||
using pointer = Enum*;
|
||||
using reference = Enum&;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
|
||||
Iterator() : _index(EnumUtils::Count<Enum>()) {}
|
||||
explicit Iterator(size_t index) : _index(index) { }
|
||||
|
||||
bool operator==(const Iterator& other) const { return other._index == _index; }
|
||||
bool operator!=(const Iterator& other) const { return !operator==(other); }
|
||||
difference_type operator-(Iterator const& other) const { return _index - other._index; }
|
||||
bool operator<(const Iterator& other) const { return _index < other._index; }
|
||||
bool operator<=(const Iterator& other) const { return _index <= other._index; }
|
||||
bool operator>(const Iterator& other) const { return _index > other._index; }
|
||||
bool operator>=(const Iterator& other) const { return _index >= other._index; }
|
||||
|
||||
value_type operator[](difference_type d) const { return FromIndex<Enum>(_index + d); }
|
||||
value_type operator*() const { return operator[](0); }
|
||||
|
||||
Iterator& operator+=(difference_type d) { _index += d; return *this; }
|
||||
Iterator& operator++() { return operator+=(1); }
|
||||
Iterator operator++(int) { Iterator i = *this; operator++(); return i; }
|
||||
Iterator operator+(difference_type d) const { Iterator i = *this; i += d; return i; }
|
||||
|
||||
Iterator& operator-=(difference_type d) { _index -= d; return *this; }
|
||||
Iterator& operator--() { return operator-=(1); }
|
||||
Iterator operator--(int) { Iterator i = *this; operator--(); return i; }
|
||||
Iterator operator-(difference_type d) const { Iterator i = *this; i -= d; return i; }
|
||||
|
||||
private:
|
||||
difference_type _index;
|
||||
};
|
||||
|
||||
template <typename Enum>
|
||||
static Iterator<Enum> Begin() { return Iterator<Enum>(0); }
|
||||
|
||||
template <typename Enum>
|
||||
static Iterator<Enum> End() { return Iterator<Enum>(); }
|
||||
|
||||
template <typename Enum>
|
||||
static Trinity::IteratorPair<Iterator<Enum>> Iterate() { return { Begin<Enum>(), End<Enum>() }; }
|
||||
|
||||
template <typename Enum>
|
||||
static char const* ToConstant(Enum value) { return ToString(value).Constant; }
|
||||
|
||||
template <typename Enum>
|
||||
static char const* ToTitle(Enum value) { return ToString(value).Title; }
|
||||
|
||||
template <typename Enum>
|
||||
static char const* ToDescription(Enum value) { return ToString(value).Description; }
|
||||
};
|
||||
|
||||
#define SMART_ENUM_BOUND(type, name) static constexpr type name = type(smart_enum::value_of<type>(smart_enum::count<type>()-1)+1);
|
||||
#define SMART_ENUM_BOUND_AFTER(type, name, entry) static constexpr type name = type(entry + 1);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
struct ItemTemplate;
|
||||
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum CreatureFlagsExtra : uint32
|
||||
{
|
||||
CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group
|
||||
@@ -68,9 +69,9 @@ enum CreatureFlagsExtra : uint32
|
||||
// Masks
|
||||
CREATURE_FLAG_EXTRA_UNUSED = (CREATURE_FLAG_EXTRA_UNUSED_13 | CREATURE_FLAG_EXTRA_UNUSED_16 | CREATURE_FLAG_EXTRA_UNUSED_22 |
|
||||
CREATURE_FLAG_EXTRA_UNUSED_23 | CREATURE_FLAG_EXTRA_UNUSED_24 | CREATURE_FLAG_EXTRA_UNUSED_25 |
|
||||
CREATURE_FLAG_EXTRA_UNUSED_26 | CREATURE_FLAG_EXTRA_UNUSED_27 | CREATURE_FLAG_EXTRA_UNUSED_31),
|
||||
CREATURE_FLAG_EXTRA_UNUSED_26 | CREATURE_FLAG_EXTRA_UNUSED_27 | CREATURE_FLAG_EXTRA_UNUSED_31), // SKIP
|
||||
|
||||
CREATURE_FLAG_EXTRA_DB_ALLOWED = (0xFFFFFFFF & ~(CREATURE_FLAG_EXTRA_UNUSED | CREATURE_FLAG_EXTRA_DUNGEON_BOSS))
|
||||
CREATURE_FLAG_EXTRA_DB_ALLOWED = (0xFFFFFFFF & ~(CREATURE_FLAG_EXTRA_UNUSED | CREATURE_FLAG_EXTRA_DUNGEON_BOSS)) // SKIP
|
||||
};
|
||||
|
||||
enum class CreatureGroundMovementType : uint8
|
||||
|
||||
108
src/server/game/Entities/Creature/enuminfo_CreatureData.cpp
Normal file
108
src/server/game/Entities/Creature/enuminfo_CreatureData.cpp
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "CreatureData.h"
|
||||
#include "Define.h"
|
||||
#include "SmartEnum.h"
|
||||
#include <stdexcept>
|
||||
|
||||
/*************************************************************************\
|
||||
|* data for enum 'CreatureFlagsExtra' in 'CreatureData.h' auto-generated *|
|
||||
\*************************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<CreatureFlagsExtra>::ToString(CreatureFlagsExtra value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case CREATURE_FLAG_EXTRA_INSTANCE_BIND: return {"CREATURE_FLAG_EXTRA_INSTANCE_BIND", "CREATURE_FLAG_EXTRA_INSTANCE_BIND", "creature kill bind instance with killer and killer's group"};
|
||||
case CREATURE_FLAG_EXTRA_CIVILIAN: return {"CREATURE_FLAG_EXTRA_CIVILIAN", "CREATURE_FLAG_EXTRA_CIVILIAN", "not aggro (ignore faction/reputation hostility)"};
|
||||
case CREATURE_FLAG_EXTRA_NO_PARRY: return {"CREATURE_FLAG_EXTRA_NO_PARRY", "CREATURE_FLAG_EXTRA_NO_PARRY", "creature can't parry"};
|
||||
case CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN: return {"CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN", "CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN", "creature can't counter-attack at parry"};
|
||||
case CREATURE_FLAG_EXTRA_NO_BLOCK: return {"CREATURE_FLAG_EXTRA_NO_BLOCK", "CREATURE_FLAG_EXTRA_NO_BLOCK", "creature can't block"};
|
||||
case CREATURE_FLAG_EXTRA_NO_CRUSH: return {"CREATURE_FLAG_EXTRA_NO_CRUSH", "CREATURE_FLAG_EXTRA_NO_CRUSH", "creature can't do crush attacks"};
|
||||
case CREATURE_FLAG_EXTRA_NO_XP_AT_KILL: return {"CREATURE_FLAG_EXTRA_NO_XP_AT_KILL", "CREATURE_FLAG_EXTRA_NO_XP_AT_KILL", "creature kill not provide XP"};
|
||||
case CREATURE_FLAG_EXTRA_TRIGGER: return {"CREATURE_FLAG_EXTRA_TRIGGER", "CREATURE_FLAG_EXTRA_TRIGGER", "trigger creature"};
|
||||
case CREATURE_FLAG_EXTRA_NO_TAUNT: return {"CREATURE_FLAG_EXTRA_NO_TAUNT", "CREATURE_FLAG_EXTRA_NO_TAUNT", "creature is immune to taunt auras and effect attack me"};
|
||||
case CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE: return {"CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE", "CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE", "creature won't update movement flags"};
|
||||
case CREATURE_FLAG_EXTRA_GHOST_VISIBILITY: return {"CREATURE_FLAG_EXTRA_GHOST_VISIBILITY", "CREATURE_FLAG_EXTRA_GHOST_VISIBILITY", "creature will be only visible for dead players"};
|
||||
case CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK: return {"CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK", "CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK", "creature will use offhand attacks"};
|
||||
case CREATURE_FLAG_EXTRA_NO_SELL_VENDOR: return {"CREATURE_FLAG_EXTRA_NO_SELL_VENDOR", "CREATURE_FLAG_EXTRA_NO_SELL_VENDOR", "players can't sell items to this vendor"};
|
||||
case CREATURE_FLAG_EXTRA_UNUSED_13: return {"CREATURE_FLAG_EXTRA_UNUSED_13", "CREATURE_FLAG_EXTRA_UNUSED_13", ""};
|
||||
case CREATURE_FLAG_EXTRA_WORLDEVENT: return {"CREATURE_FLAG_EXTRA_WORLDEVENT", "CREATURE_FLAG_EXTRA_WORLDEVENT", "custom flag for world event creatures (left room for merging)"};
|
||||
case CREATURE_FLAG_EXTRA_GUARD: return {"CREATURE_FLAG_EXTRA_GUARD", "CREATURE_FLAG_EXTRA_GUARD", "Creature is guard"};
|
||||
case CREATURE_FLAG_EXTRA_UNUSED_16: return {"CREATURE_FLAG_EXTRA_UNUSED_16", "CREATURE_FLAG_EXTRA_UNUSED_16", ""};
|
||||
case CREATURE_FLAG_EXTRA_NO_CRIT: return {"CREATURE_FLAG_EXTRA_NO_CRIT", "CREATURE_FLAG_EXTRA_NO_CRIT", "creature can't do critical strikes"};
|
||||
case CREATURE_FLAG_EXTRA_NO_SKILLGAIN: return {"CREATURE_FLAG_EXTRA_NO_SKILLGAIN", "CREATURE_FLAG_EXTRA_NO_SKILLGAIN", "creature won't increase weapon skills"};
|
||||
case CREATURE_FLAG_EXTRA_TAUNT_DIMINISH: return {"CREATURE_FLAG_EXTRA_TAUNT_DIMINISH", "CREATURE_FLAG_EXTRA_TAUNT_DIMINISH", "Taunt is a subject to diminishing returns on this creautre"};
|
||||
case CREATURE_FLAG_EXTRA_ALL_DIMINISH: return {"CREATURE_FLAG_EXTRA_ALL_DIMINISH", "CREATURE_FLAG_EXTRA_ALL_DIMINISH", "creature is subject to all diminishing returns as player are"};
|
||||
case CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ: return {"CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ", "CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ", "creature does not need to take player damage for kill credit"};
|
||||
case CREATURE_FLAG_EXTRA_UNUSED_22: return {"CREATURE_FLAG_EXTRA_UNUSED_22", "CREATURE_FLAG_EXTRA_UNUSED_22", ""};
|
||||
case CREATURE_FLAG_EXTRA_UNUSED_23: return {"CREATURE_FLAG_EXTRA_UNUSED_23", "CREATURE_FLAG_EXTRA_UNUSED_23", ""};
|
||||
case CREATURE_FLAG_EXTRA_UNUSED_24: return {"CREATURE_FLAG_EXTRA_UNUSED_24", "CREATURE_FLAG_EXTRA_UNUSED_24", ""};
|
||||
case CREATURE_FLAG_EXTRA_UNUSED_25: return {"CREATURE_FLAG_EXTRA_UNUSED_25", "CREATURE_FLAG_EXTRA_UNUSED_25", ""};
|
||||
case CREATURE_FLAG_EXTRA_UNUSED_26: return {"CREATURE_FLAG_EXTRA_UNUSED_26", "CREATURE_FLAG_EXTRA_UNUSED_26", ""};
|
||||
case CREATURE_FLAG_EXTRA_UNUSED_27: return {"CREATURE_FLAG_EXTRA_UNUSED_27", "CREATURE_FLAG_EXTRA_UNUSED_27", ""};
|
||||
case CREATURE_FLAG_EXTRA_DUNGEON_BOSS: return {"CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "CREATURE_FLAG_EXTRA_DUNGEON_BOSS", "creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)"};
|
||||
case CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING: return {"CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING", "CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING", "creature ignore pathfinding"};
|
||||
case CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK: return {"CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK", "CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK", "creature is immune to knockback effects"};
|
||||
case CREATURE_FLAG_EXTRA_UNUSED_31: return {"CREATURE_FLAG_EXTRA_UNUSED_31", "CREATURE_FLAG_EXTRA_UNUSED_31", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<CreatureFlagsExtra>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT CreatureFlagsExtra Trinity::Impl::EnumUtils<CreatureFlagsExtra>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return CREATURE_FLAG_EXTRA_INSTANCE_BIND;
|
||||
case 1: return CREATURE_FLAG_EXTRA_CIVILIAN;
|
||||
case 2: return CREATURE_FLAG_EXTRA_NO_PARRY;
|
||||
case 3: return CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN;
|
||||
case 4: return CREATURE_FLAG_EXTRA_NO_BLOCK;
|
||||
case 5: return CREATURE_FLAG_EXTRA_NO_CRUSH;
|
||||
case 6: return CREATURE_FLAG_EXTRA_NO_XP_AT_KILL;
|
||||
case 7: return CREATURE_FLAG_EXTRA_TRIGGER;
|
||||
case 8: return CREATURE_FLAG_EXTRA_NO_TAUNT;
|
||||
case 9: return CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE;
|
||||
case 10: return CREATURE_FLAG_EXTRA_GHOST_VISIBILITY;
|
||||
case 11: return CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK;
|
||||
case 12: return CREATURE_FLAG_EXTRA_NO_SELL_VENDOR;
|
||||
case 13: return CREATURE_FLAG_EXTRA_UNUSED_13;
|
||||
case 14: return CREATURE_FLAG_EXTRA_WORLDEVENT;
|
||||
case 15: return CREATURE_FLAG_EXTRA_GUARD;
|
||||
case 16: return CREATURE_FLAG_EXTRA_UNUSED_16;
|
||||
case 17: return CREATURE_FLAG_EXTRA_NO_CRIT;
|
||||
case 18: return CREATURE_FLAG_EXTRA_NO_SKILLGAIN;
|
||||
case 19: return CREATURE_FLAG_EXTRA_TAUNT_DIMINISH;
|
||||
case 20: return CREATURE_FLAG_EXTRA_ALL_DIMINISH;
|
||||
case 21: return CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ;
|
||||
case 22: return CREATURE_FLAG_EXTRA_UNUSED_22;
|
||||
case 23: return CREATURE_FLAG_EXTRA_UNUSED_23;
|
||||
case 24: return CREATURE_FLAG_EXTRA_UNUSED_24;
|
||||
case 25: return CREATURE_FLAG_EXTRA_UNUSED_25;
|
||||
case 26: return CREATURE_FLAG_EXTRA_UNUSED_26;
|
||||
case 27: return CREATURE_FLAG_EXTRA_UNUSED_27;
|
||||
case 28: return CREATURE_FLAG_EXTRA_DUNGEON_BOSS;
|
||||
case 29: return CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING;
|
||||
case 30: return CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK;
|
||||
case 31: return CREATURE_FLAG_EXTRA_UNUSED_31;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ enum UnitRename : uint8
|
||||
};
|
||||
|
||||
// Value masks for UNIT_FIELD_FLAGS
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum UnitFlags : uint32
|
||||
{
|
||||
UNIT_FLAG_SERVER_CONTROLLED = 0x00000001, // set only when unit movement is controlled by server - by SPLINE/MONSTER_MOVE packets, together with UNIT_FLAG_STUNNED; only set to units controlled by client; client function CGUnit_C::IsClientControlled returns false when set for owner
|
||||
@@ -152,7 +153,6 @@ enum UnitFlags : uint32
|
||||
UNIT_FLAG_UNK_29 = 0x20000000, // used in Feing Death spell
|
||||
UNIT_FLAG_SHEATHE = 0x40000000,
|
||||
UNIT_FLAG_UNK_31 = 0x80000000,
|
||||
MAX_UNIT_FLAGS = 33
|
||||
};
|
||||
|
||||
// Value masks for UNIT_FIELD_FLAGS_2
|
||||
@@ -179,36 +179,37 @@ enum UnitFlags2 : uint32
|
||||
};
|
||||
|
||||
/// Non Player Character flags
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum NPCFlags : uint32
|
||||
{
|
||||
UNIT_NPC_FLAG_NONE = 0x00000000,
|
||||
UNIT_NPC_FLAG_GOSSIP = 0x00000001, // 100%
|
||||
UNIT_NPC_FLAG_QUESTGIVER = 0x00000002, // guessed, probably ok
|
||||
UNIT_NPC_FLAG_NONE = 0x00000000, // SKIP
|
||||
UNIT_NPC_FLAG_GOSSIP = 0x00000001, // TITLE has gossip menu DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_QUESTGIVER = 0x00000002, // TITLE is quest giver DESCRIPTION guessed, probably ok
|
||||
UNIT_NPC_FLAG_UNK1 = 0x00000004,
|
||||
UNIT_NPC_FLAG_UNK2 = 0x00000008,
|
||||
UNIT_NPC_FLAG_TRAINER = 0x00000010, // 100%
|
||||
UNIT_NPC_FLAG_TRAINER_CLASS = 0x00000020, // 100%
|
||||
UNIT_NPC_FLAG_TRAINER_PROFESSION = 0x00000040, // 100%
|
||||
UNIT_NPC_FLAG_VENDOR = 0x00000080, // 100%
|
||||
UNIT_NPC_FLAG_VENDOR_AMMO = 0x00000100, // 100%, general goods vendor
|
||||
UNIT_NPC_FLAG_VENDOR_FOOD = 0x00000200, // 100%
|
||||
UNIT_NPC_FLAG_VENDOR_POISON = 0x00000400, // guessed
|
||||
UNIT_NPC_FLAG_VENDOR_REAGENT = 0x00000800, // 100%
|
||||
UNIT_NPC_FLAG_REPAIR = 0x00001000, // 100%
|
||||
UNIT_NPC_FLAG_FLIGHTMASTER = 0x00002000, // 100%
|
||||
UNIT_NPC_FLAG_SPIRITHEALER = 0x00004000, // guessed
|
||||
UNIT_NPC_FLAG_SPIRITGUIDE = 0x00008000, // guessed
|
||||
UNIT_NPC_FLAG_INNKEEPER = 0x00010000, // 100%
|
||||
UNIT_NPC_FLAG_BANKER = 0x00020000, // 100%
|
||||
UNIT_NPC_FLAG_PETITIONER = 0x00040000, // 100% 0xC0000 = guild petitions, 0x40000 = arena team petitions
|
||||
UNIT_NPC_FLAG_TABARDDESIGNER = 0x00080000, // 100%
|
||||
UNIT_NPC_FLAG_BATTLEMASTER = 0x00100000, // 100%
|
||||
UNIT_NPC_FLAG_AUCTIONEER = 0x00200000, // 100%
|
||||
UNIT_NPC_FLAG_STABLEMASTER = 0x00400000, // 100%
|
||||
UNIT_NPC_FLAG_GUILD_BANKER = 0x00800000, // cause client to send 997 opcode
|
||||
UNIT_NPC_FLAG_SPELLCLICK = 0x01000000, // cause client to send 1015 opcode (spell click)
|
||||
UNIT_NPC_FLAG_PLAYER_VEHICLE = 0x02000000, // players with mounts that have vehicle data should have it set
|
||||
UNIT_NPC_FLAG_MAILBOX = 0x04000000 //
|
||||
UNIT_NPC_FLAG_TRAINER = 0x00000010, // TITLE is trainer DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_TRAINER_CLASS = 0x00000020, // TITLE is class trainer DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_TRAINER_PROFESSION = 0x00000040, // TITLE is profession trainer DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_VENDOR = 0x00000080, // TITLE is vendor (generic) DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_VENDOR_AMMO = 0x00000100, // TITLE is vendor (ammo) DESCRIPTION 100%, general goods vendor
|
||||
UNIT_NPC_FLAG_VENDOR_FOOD = 0x00000200, // TITLE is vendor (food) DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_VENDOR_POISON = 0x00000400, // TITLE is vendor (poison) DESCRIPTION guessed
|
||||
UNIT_NPC_FLAG_VENDOR_REAGENT = 0x00000800, // TITLE is vendor (reagents) DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_REPAIR = 0x00001000, // TITLE can repair DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_FLIGHTMASTER = 0x00002000, // TITLE is flight master DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_SPIRITHEALER = 0x00004000, // TITLE is spirit healer DESCRIPTION guessed
|
||||
UNIT_NPC_FLAG_SPIRITGUIDE = 0x00008000, // TITLE is spirit guide DESCRIPTION guessed
|
||||
UNIT_NPC_FLAG_INNKEEPER = 0x00010000, // TITLE is innkeeper
|
||||
UNIT_NPC_FLAG_BANKER = 0x00020000, // TITLE is banker DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_PETITIONER = 0x00040000, // TITLE handles guild/arena petitions DESCRIPTION 100% 0xC0000 = guild petitions, 0x40000 = arena team petitions
|
||||
UNIT_NPC_FLAG_TABARDDESIGNER = 0x00080000, // TITLE is guild tabard designer DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_BATTLEMASTER = 0x00100000, // TITLE is battlemaster DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_AUCTIONEER = 0x00200000, // TITLE is auctioneer DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_STABLEMASTER = 0x00400000, // TITLE is stable master DESCRIPTION 100%
|
||||
UNIT_NPC_FLAG_GUILD_BANKER = 0x00800000, // TITLE is guild banker DESCRIPTION cause client to send 997 opcode
|
||||
UNIT_NPC_FLAG_SPELLCLICK = 0x01000000, // TITLE has spell click enabled DESCRIPTION cause client to send 1015 opcode (spell click)
|
||||
UNIT_NPC_FLAG_PLAYER_VEHICLE = 0x02000000, // TITLE is player vehicle DESCRIPTION players with mounts that have vehicle data should have it set
|
||||
UNIT_NPC_FLAG_MAILBOX = 0x04000000 // TITLE is mailbox
|
||||
};
|
||||
|
||||
enum MovementFlags : uint32
|
||||
|
||||
184
src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp
Normal file
184
src/server/game/Entities/Unit/enuminfo_UnitDefines.cpp
Normal file
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "UnitDefines.h"
|
||||
#include "Define.h"
|
||||
#include "SmartEnum.h"
|
||||
#include <stdexcept>
|
||||
|
||||
/***************************************************************\
|
||||
|* data for enum 'UnitFlags' in 'UnitDefines.h' auto-generated *|
|
||||
\***************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<UnitFlags>::ToString(UnitFlags value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case UNIT_FLAG_SERVER_CONTROLLED: return {"UNIT_FLAG_SERVER_CONTROLLED", "UNIT_FLAG_SERVER_CONTROLLED", "set only when unit movement is controlled by server - by SPLINE/MONSTER_MOVE packets, together with UNIT_FLAG_STUNNED; only set to units controlled by client; client function CGUnit_C::IsClientControlled returns false when set for owner"};
|
||||
case UNIT_FLAG_NON_ATTACKABLE: return {"UNIT_FLAG_NON_ATTACKABLE", "UNIT_FLAG_NON_ATTACKABLE", "not attackable"};
|
||||
case UNIT_FLAG_REMOVE_CLIENT_CONTROL: return {"UNIT_FLAG_REMOVE_CLIENT_CONTROL", "UNIT_FLAG_REMOVE_CLIENT_CONTROL", "This is a legacy flag used to disable movement player's movement while controlling other units, SMSG_CLIENT_CONTROL replaces this functionality clientside now. CONFUSED and FLEEING flags have the same effect on client movement asDISABLE_MOVE_CONTROL in addition to preventing spell casts/autoattack (they all allow climbing steeper hills and emotes while moving)"};
|
||||
case UNIT_FLAG_PLAYER_CONTROLLED: return {"UNIT_FLAG_PLAYER_CONTROLLED", "UNIT_FLAG_PLAYER_CONTROLLED", "controlled by player, use _IMMUNE_TO_PC instead of _IMMUNE_TO_NPC"};
|
||||
case UNIT_FLAG_RENAME: return {"UNIT_FLAG_RENAME", "UNIT_FLAG_RENAME", ""};
|
||||
case UNIT_FLAG_PREPARATION: return {"UNIT_FLAG_PREPARATION", "UNIT_FLAG_PREPARATION", "don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP"};
|
||||
case UNIT_FLAG_UNK_6: return {"UNIT_FLAG_UNK_6", "UNIT_FLAG_UNK_6", ""};
|
||||
case UNIT_FLAG_NOT_ATTACKABLE_1: return {"UNIT_FLAG_NOT_ATTACKABLE_1", "UNIT_FLAG_NOT_ATTACKABLE_1", "?? (UNIT_FLAG_PLAYER_CONTROLLED | UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE"};
|
||||
case UNIT_FLAG_IMMUNE_TO_PC: return {"UNIT_FLAG_IMMUNE_TO_PC", "UNIT_FLAG_IMMUNE_TO_PC", "disables combat/assistance with PlayerCharacters (PC) - see Unit::IsValidAttackTarget, Unit::IsValidAssistTarget"};
|
||||
case UNIT_FLAG_IMMUNE_TO_NPC: return {"UNIT_FLAG_IMMUNE_TO_NPC", "UNIT_FLAG_IMMUNE_TO_NPC", "disables combat/assistance with NonPlayerCharacters (NPC) - see Unit::IsValidAttackTarget, Unit::IsValidAssistTarget"};
|
||||
case UNIT_FLAG_LOOTING: return {"UNIT_FLAG_LOOTING", "UNIT_FLAG_LOOTING", "loot animation"};
|
||||
case UNIT_FLAG_PET_IN_COMBAT: return {"UNIT_FLAG_PET_IN_COMBAT", "UNIT_FLAG_PET_IN_COMBAT", "on player pets: whether the pet is chasing a target to attack || on other units: whether any of the unit's minions is in combat"};
|
||||
case UNIT_FLAG_PVP: return {"UNIT_FLAG_PVP", "UNIT_FLAG_PVP", "changed in 3.0.3"};
|
||||
case UNIT_FLAG_SILENCED: return {"UNIT_FLAG_SILENCED", "UNIT_FLAG_SILENCED", "silenced, 2.1.1"};
|
||||
case UNIT_FLAG_CANNOT_SWIM: return {"UNIT_FLAG_CANNOT_SWIM", "UNIT_FLAG_CANNOT_SWIM", "2.0.8"};
|
||||
case UNIT_FLAG_UNK_15: return {"UNIT_FLAG_UNK_15", "UNIT_FLAG_UNK_15", ""};
|
||||
case UNIT_FLAG_NON_ATTACKABLE_2: return {"UNIT_FLAG_NON_ATTACKABLE_2", "UNIT_FLAG_NON_ATTACKABLE_2", "removes attackable icon, if on yourself, cannot assist self but can cast TARGET_SELF spells - added by SPELL_AURA_MOD_UNATTACKABLE"};
|
||||
case UNIT_FLAG_PACIFIED: return {"UNIT_FLAG_PACIFIED", "UNIT_FLAG_PACIFIED", "3.0.3 ok"};
|
||||
case UNIT_FLAG_STUNNED: return {"UNIT_FLAG_STUNNED", "UNIT_FLAG_STUNNED", "3.0.3 ok"};
|
||||
case UNIT_FLAG_IN_COMBAT: return {"UNIT_FLAG_IN_COMBAT", "UNIT_FLAG_IN_COMBAT", ""};
|
||||
case UNIT_FLAG_TAXI_FLIGHT: return {"UNIT_FLAG_TAXI_FLIGHT", "UNIT_FLAG_TAXI_FLIGHT", "disable casting at client side spell not allowed by taxi flight (mounted?), probably used with 0x4 flag"};
|
||||
case UNIT_FLAG_DISARMED: return {"UNIT_FLAG_DISARMED", "UNIT_FLAG_DISARMED", "3.0.3, disable melee spells casting..., \042Required melee weapon\042 added to melee spells tooltip."};
|
||||
case UNIT_FLAG_CONFUSED: return {"UNIT_FLAG_CONFUSED", "UNIT_FLAG_CONFUSED", ""};
|
||||
case UNIT_FLAG_FLEEING: return {"UNIT_FLAG_FLEEING", "UNIT_FLAG_FLEEING", ""};
|
||||
case UNIT_FLAG_POSSESSED: return {"UNIT_FLAG_POSSESSED", "UNIT_FLAG_POSSESSED", "under direct client control by a player (possess or vehicle)"};
|
||||
case UNIT_FLAG_NOT_SELECTABLE: return {"UNIT_FLAG_NOT_SELECTABLE", "UNIT_FLAG_NOT_SELECTABLE", ""};
|
||||
case UNIT_FLAG_SKINNABLE: return {"UNIT_FLAG_SKINNABLE", "UNIT_FLAG_SKINNABLE", ""};
|
||||
case UNIT_FLAG_MOUNT: return {"UNIT_FLAG_MOUNT", "UNIT_FLAG_MOUNT", ""};
|
||||
case UNIT_FLAG_UNK_28: return {"UNIT_FLAG_UNK_28", "UNIT_FLAG_UNK_28", ""};
|
||||
case UNIT_FLAG_UNK_29: return {"UNIT_FLAG_UNK_29", "UNIT_FLAG_UNK_29", "used in Feing Death spell"};
|
||||
case UNIT_FLAG_SHEATHE: return {"UNIT_FLAG_SHEATHE", "UNIT_FLAG_SHEATHE", ""};
|
||||
case UNIT_FLAG_UNK_31: return {"UNIT_FLAG_UNK_31", "UNIT_FLAG_UNK_31", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<UnitFlags>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT UnitFlags Trinity::Impl::EnumUtils<UnitFlags>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return UNIT_FLAG_SERVER_CONTROLLED;
|
||||
case 1: return UNIT_FLAG_NON_ATTACKABLE;
|
||||
case 2: return UNIT_FLAG_REMOVE_CLIENT_CONTROL;
|
||||
case 3: return UNIT_FLAG_PLAYER_CONTROLLED;
|
||||
case 4: return UNIT_FLAG_RENAME;
|
||||
case 5: return UNIT_FLAG_PREPARATION;
|
||||
case 6: return UNIT_FLAG_UNK_6;
|
||||
case 7: return UNIT_FLAG_NOT_ATTACKABLE_1;
|
||||
case 8: return UNIT_FLAG_IMMUNE_TO_PC;
|
||||
case 9: return UNIT_FLAG_IMMUNE_TO_NPC;
|
||||
case 10: return UNIT_FLAG_LOOTING;
|
||||
case 11: return UNIT_FLAG_PET_IN_COMBAT;
|
||||
case 12: return UNIT_FLAG_PVP;
|
||||
case 13: return UNIT_FLAG_SILENCED;
|
||||
case 14: return UNIT_FLAG_CANNOT_SWIM;
|
||||
case 15: return UNIT_FLAG_UNK_15;
|
||||
case 16: return UNIT_FLAG_NON_ATTACKABLE_2;
|
||||
case 17: return UNIT_FLAG_PACIFIED;
|
||||
case 18: return UNIT_FLAG_STUNNED;
|
||||
case 19: return UNIT_FLAG_IN_COMBAT;
|
||||
case 20: return UNIT_FLAG_TAXI_FLIGHT;
|
||||
case 21: return UNIT_FLAG_DISARMED;
|
||||
case 22: return UNIT_FLAG_CONFUSED;
|
||||
case 23: return UNIT_FLAG_FLEEING;
|
||||
case 24: return UNIT_FLAG_POSSESSED;
|
||||
case 25: return UNIT_FLAG_NOT_SELECTABLE;
|
||||
case 26: return UNIT_FLAG_SKINNABLE;
|
||||
case 27: return UNIT_FLAG_MOUNT;
|
||||
case 28: return UNIT_FLAG_UNK_28;
|
||||
case 29: return UNIT_FLAG_UNK_29;
|
||||
case 30: return UNIT_FLAG_SHEATHE;
|
||||
case 31: return UNIT_FLAG_UNK_31;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************\
|
||||
|* data for enum 'NPCFlags' in 'UnitDefines.h' auto-generated *|
|
||||
\**************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<NPCFlags>::ToString(NPCFlags value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case UNIT_NPC_FLAG_GOSSIP: return {"UNIT_NPC_FLAG_GOSSIP", "has gossip menu", "100%"};
|
||||
case UNIT_NPC_FLAG_QUESTGIVER: return {"UNIT_NPC_FLAG_QUESTGIVER", "is quest giver", "guessed, probably ok"};
|
||||
case UNIT_NPC_FLAG_UNK1: return {"UNIT_NPC_FLAG_UNK1", "UNIT_NPC_FLAG_UNK1", ""};
|
||||
case UNIT_NPC_FLAG_UNK2: return {"UNIT_NPC_FLAG_UNK2", "UNIT_NPC_FLAG_UNK2", ""};
|
||||
case UNIT_NPC_FLAG_TRAINER: return {"UNIT_NPC_FLAG_TRAINER", "is trainer", "100%"};
|
||||
case UNIT_NPC_FLAG_TRAINER_CLASS: return {"UNIT_NPC_FLAG_TRAINER_CLASS", "is class trainer", "100%"};
|
||||
case UNIT_NPC_FLAG_TRAINER_PROFESSION: return {"UNIT_NPC_FLAG_TRAINER_PROFESSION", "is profession trainer", "100%"};
|
||||
case UNIT_NPC_FLAG_VENDOR: return {"UNIT_NPC_FLAG_VENDOR", "is vendor (generic)", "100%"};
|
||||
case UNIT_NPC_FLAG_VENDOR_AMMO: return {"UNIT_NPC_FLAG_VENDOR_AMMO", "is vendor (ammo)", "100%, general goods vendor"};
|
||||
case UNIT_NPC_FLAG_VENDOR_FOOD: return {"UNIT_NPC_FLAG_VENDOR_FOOD", "is vendor (food)", "100%"};
|
||||
case UNIT_NPC_FLAG_VENDOR_POISON: return {"UNIT_NPC_FLAG_VENDOR_POISON", "is vendor (poison)", "guessed"};
|
||||
case UNIT_NPC_FLAG_VENDOR_REAGENT: return {"UNIT_NPC_FLAG_VENDOR_REAGENT", "is vendor (reagents)", "100%"};
|
||||
case UNIT_NPC_FLAG_REPAIR: return {"UNIT_NPC_FLAG_REPAIR", "can repair", "100%"};
|
||||
case UNIT_NPC_FLAG_FLIGHTMASTER: return {"UNIT_NPC_FLAG_FLIGHTMASTER", "is flight master", "100%"};
|
||||
case UNIT_NPC_FLAG_SPIRITHEALER: return {"UNIT_NPC_FLAG_SPIRITHEALER", "is spirit healer", "guessed"};
|
||||
case UNIT_NPC_FLAG_SPIRITGUIDE: return {"UNIT_NPC_FLAG_SPIRITGUIDE", "is spirit guide", "guessed"};
|
||||
case UNIT_NPC_FLAG_INNKEEPER: return {"UNIT_NPC_FLAG_INNKEEPER", "is innkeeper", ""};
|
||||
case UNIT_NPC_FLAG_BANKER: return {"UNIT_NPC_FLAG_BANKER", "is banker", "100%"};
|
||||
case UNIT_NPC_FLAG_PETITIONER: return {"UNIT_NPC_FLAG_PETITIONER", "handles guild/arena petitions", "100% 0xC0000 = guild petitions, 0x40000 = arena team petitions"};
|
||||
case UNIT_NPC_FLAG_TABARDDESIGNER: return {"UNIT_NPC_FLAG_TABARDDESIGNER", "is guild tabard designer", "100%"};
|
||||
case UNIT_NPC_FLAG_BATTLEMASTER: return {"UNIT_NPC_FLAG_BATTLEMASTER", "is battlemaster", "100%"};
|
||||
case UNIT_NPC_FLAG_AUCTIONEER: return {"UNIT_NPC_FLAG_AUCTIONEER", "is auctioneer", "100%"};
|
||||
case UNIT_NPC_FLAG_STABLEMASTER: return {"UNIT_NPC_FLAG_STABLEMASTER", "is stable master", "100%"};
|
||||
case UNIT_NPC_FLAG_GUILD_BANKER: return {"UNIT_NPC_FLAG_GUILD_BANKER", "is guild banker", "cause client to send 997 opcode"};
|
||||
case UNIT_NPC_FLAG_SPELLCLICK: return {"UNIT_NPC_FLAG_SPELLCLICK", "has spell click enabled", "cause client to send 1015 opcode (spell click)"};
|
||||
case UNIT_NPC_FLAG_PLAYER_VEHICLE: return {"UNIT_NPC_FLAG_PLAYER_VEHICLE", "is player vehicle", "players with mounts that have vehicle data should have it set"};
|
||||
case UNIT_NPC_FLAG_MAILBOX: return {"UNIT_NPC_FLAG_MAILBOX", "is mailbox", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<NPCFlags>::Count() { return 27; }
|
||||
template <>
|
||||
TC_API_EXPORT NPCFlags Trinity::Impl::EnumUtils<NPCFlags>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return UNIT_NPC_FLAG_GOSSIP;
|
||||
case 1: return UNIT_NPC_FLAG_QUESTGIVER;
|
||||
case 2: return UNIT_NPC_FLAG_UNK1;
|
||||
case 3: return UNIT_NPC_FLAG_UNK2;
|
||||
case 4: return UNIT_NPC_FLAG_TRAINER;
|
||||
case 5: return UNIT_NPC_FLAG_TRAINER_CLASS;
|
||||
case 6: return UNIT_NPC_FLAG_TRAINER_PROFESSION;
|
||||
case 7: return UNIT_NPC_FLAG_VENDOR;
|
||||
case 8: return UNIT_NPC_FLAG_VENDOR_AMMO;
|
||||
case 9: return UNIT_NPC_FLAG_VENDOR_FOOD;
|
||||
case 10: return UNIT_NPC_FLAG_VENDOR_POISON;
|
||||
case 11: return UNIT_NPC_FLAG_VENDOR_REAGENT;
|
||||
case 12: return UNIT_NPC_FLAG_REPAIR;
|
||||
case 13: return UNIT_NPC_FLAG_FLIGHTMASTER;
|
||||
case 14: return UNIT_NPC_FLAG_SPIRITHEALER;
|
||||
case 15: return UNIT_NPC_FLAG_SPIRITGUIDE;
|
||||
case 16: return UNIT_NPC_FLAG_INNKEEPER;
|
||||
case 17: return UNIT_NPC_FLAG_BANKER;
|
||||
case 18: return UNIT_NPC_FLAG_PETITIONER;
|
||||
case 19: return UNIT_NPC_FLAG_TABARDDESIGNER;
|
||||
case 20: return UNIT_NPC_FLAG_BATTLEMASTER;
|
||||
case 21: return UNIT_NPC_FLAG_AUCTIONEER;
|
||||
case 22: return UNIT_NPC_FLAG_STABLEMASTER;
|
||||
case 23: return UNIT_NPC_FLAG_GUILD_BANKER;
|
||||
case 24: return UNIT_NPC_FLAG_SPELLCLICK;
|
||||
case 25: return UNIT_NPC_FLAG_PLAYER_VEHICLE;
|
||||
case 26: return UNIT_NPC_FLAG_MAILBOX;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,145 +45,6 @@ EndScriptData */
|
||||
#include <boost/core/demangle.hpp>
|
||||
#include <typeinfo>
|
||||
|
||||
template<typename E, typename T = char const*>
|
||||
struct EnumName
|
||||
{
|
||||
E Value;
|
||||
T Name;
|
||||
};
|
||||
|
||||
#define CREATE_NAMED_ENUM(VALUE) { VALUE, STRINGIZE(VALUE) }
|
||||
|
||||
EnumName<NPCFlags, int32> const npcFlagTexts[] =
|
||||
{
|
||||
{ UNIT_NPC_FLAG_AUCTIONEER, LANG_NPCINFO_AUCTIONEER },
|
||||
{ UNIT_NPC_FLAG_BANKER, LANG_NPCINFO_BANKER },
|
||||
{ UNIT_NPC_FLAG_BATTLEMASTER, LANG_NPCINFO_BATTLEMASTER },
|
||||
{ UNIT_NPC_FLAG_FLIGHTMASTER, LANG_NPCINFO_FLIGHTMASTER },
|
||||
{ UNIT_NPC_FLAG_GOSSIP, LANG_NPCINFO_GOSSIP },
|
||||
{ UNIT_NPC_FLAG_GUILD_BANKER, LANG_NPCINFO_GUILD_BANKER },
|
||||
{ UNIT_NPC_FLAG_INNKEEPER, LANG_NPCINFO_INNKEEPER },
|
||||
{ UNIT_NPC_FLAG_PETITIONER, LANG_NPCINFO_PETITIONER },
|
||||
{ UNIT_NPC_FLAG_PLAYER_VEHICLE, LANG_NPCINFO_PLAYER_VEHICLE },
|
||||
{ UNIT_NPC_FLAG_QUESTGIVER, LANG_NPCINFO_QUESTGIVER },
|
||||
{ UNIT_NPC_FLAG_REPAIR, LANG_NPCINFO_REPAIR },
|
||||
{ UNIT_NPC_FLAG_SPELLCLICK, LANG_NPCINFO_SPELLCLICK },
|
||||
{ UNIT_NPC_FLAG_SPIRITGUIDE, LANG_NPCINFO_SPIRITGUIDE },
|
||||
{ UNIT_NPC_FLAG_SPIRITHEALER, LANG_NPCINFO_SPIRITHEALER },
|
||||
{ UNIT_NPC_FLAG_STABLEMASTER, LANG_NPCINFO_STABLEMASTER },
|
||||
{ UNIT_NPC_FLAG_TABARDDESIGNER, LANG_NPCINFO_TABARDDESIGNER },
|
||||
{ UNIT_NPC_FLAG_TRAINER, LANG_NPCINFO_TRAINER },
|
||||
{ UNIT_NPC_FLAG_TRAINER_CLASS, LANG_NPCINFO_TRAINER_CLASS },
|
||||
{ UNIT_NPC_FLAG_TRAINER_PROFESSION, LANG_NPCINFO_TRAINER_PROFESSION },
|
||||
{ UNIT_NPC_FLAG_VENDOR, LANG_NPCINFO_VENDOR },
|
||||
{ UNIT_NPC_FLAG_VENDOR_AMMO, LANG_NPCINFO_VENDOR_AMMO },
|
||||
{ UNIT_NPC_FLAG_VENDOR_FOOD, LANG_NPCINFO_VENDOR_FOOD },
|
||||
{ UNIT_NPC_FLAG_VENDOR_POISON, LANG_NPCINFO_VENDOR_POISON },
|
||||
{ UNIT_NPC_FLAG_VENDOR_REAGENT, LANG_NPCINFO_VENDOR_REAGENT }
|
||||
};
|
||||
|
||||
uint32 const NPCFLAG_COUNT = std::extent<decltype(npcFlagTexts)>::value;
|
||||
|
||||
EnumName<Mechanics> const mechanicImmunes[MAX_MECHANIC] =
|
||||
{
|
||||
CREATE_NAMED_ENUM(MECHANIC_NONE),
|
||||
CREATE_NAMED_ENUM(MECHANIC_CHARM),
|
||||
CREATE_NAMED_ENUM(MECHANIC_DISORIENTED),
|
||||
CREATE_NAMED_ENUM(MECHANIC_DISARM),
|
||||
CREATE_NAMED_ENUM(MECHANIC_DISTRACT),
|
||||
CREATE_NAMED_ENUM(MECHANIC_FEAR),
|
||||
CREATE_NAMED_ENUM(MECHANIC_GRIP),
|
||||
CREATE_NAMED_ENUM(MECHANIC_ROOT),
|
||||
CREATE_NAMED_ENUM(MECHANIC_SLOW_ATTACK),
|
||||
CREATE_NAMED_ENUM(MECHANIC_SILENCE),
|
||||
CREATE_NAMED_ENUM(MECHANIC_SLEEP),
|
||||
CREATE_NAMED_ENUM(MECHANIC_SNARE),
|
||||
CREATE_NAMED_ENUM(MECHANIC_STUN),
|
||||
CREATE_NAMED_ENUM(MECHANIC_FREEZE),
|
||||
CREATE_NAMED_ENUM(MECHANIC_KNOCKOUT),
|
||||
CREATE_NAMED_ENUM(MECHANIC_BLEED),
|
||||
CREATE_NAMED_ENUM(MECHANIC_BANDAGE),
|
||||
CREATE_NAMED_ENUM(MECHANIC_POLYMORPH),
|
||||
CREATE_NAMED_ENUM(MECHANIC_BANISH),
|
||||
CREATE_NAMED_ENUM(MECHANIC_SHIELD),
|
||||
CREATE_NAMED_ENUM(MECHANIC_SHACKLE),
|
||||
CREATE_NAMED_ENUM(MECHANIC_MOUNT),
|
||||
CREATE_NAMED_ENUM(MECHANIC_INFECTED),
|
||||
CREATE_NAMED_ENUM(MECHANIC_TURN),
|
||||
CREATE_NAMED_ENUM(MECHANIC_HORROR),
|
||||
CREATE_NAMED_ENUM(MECHANIC_INVULNERABILITY),
|
||||
CREATE_NAMED_ENUM(MECHANIC_INTERRUPT),
|
||||
CREATE_NAMED_ENUM(MECHANIC_DAZE),
|
||||
CREATE_NAMED_ENUM(MECHANIC_DISCOVERY),
|
||||
CREATE_NAMED_ENUM(MECHANIC_IMMUNE_SHIELD),
|
||||
CREATE_NAMED_ENUM(MECHANIC_SAPPED),
|
||||
CREATE_NAMED_ENUM(MECHANIC_ENRAGED)
|
||||
};
|
||||
|
||||
EnumName<UnitFlags> const unitFlags[MAX_UNIT_FLAGS] =
|
||||
{
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_SERVER_CONTROLLED),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_NON_ATTACKABLE),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_REMOVE_CLIENT_CONTROL),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_PLAYER_CONTROLLED),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_RENAME),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_PREPARATION),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_UNK_6),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_NOT_ATTACKABLE_1),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_IMMUNE_TO_PC),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_IMMUNE_TO_NPC),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_LOOTING),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_PET_IN_COMBAT),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_PVP),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_SILENCED),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_CANNOT_SWIM),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_UNK_15),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_NON_ATTACKABLE_2),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_PACIFIED),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_STUNNED),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_IN_COMBAT),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_TAXI_FLIGHT),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_DISARMED),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_CONFUSED),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_FLEEING),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_POSSESSED),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_NOT_SELECTABLE),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_SKINNABLE),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_MOUNT),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_UNK_28),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_UNK_29),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_SHEATHE),
|
||||
CREATE_NAMED_ENUM(UNIT_FLAG_UNK_31)
|
||||
};
|
||||
|
||||
EnumName<CreatureFlagsExtra> const flagsExtra[] =
|
||||
{
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_INSTANCE_BIND),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_CIVILIAN),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_PARRY),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_BLOCK),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_CRUSH),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_XP_AT_KILL),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_TRIGGER),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_TAUNT),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_SELL_VENDOR),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_WORLDEVENT),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_GUARD),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_CRIT),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_SKILLGAIN),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_TAUNT_DIMINISH),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_ALL_DIMINISH),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_DUNGEON_BOSS),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK),
|
||||
CREATE_NAMED_ENUM(CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK)
|
||||
};
|
||||
|
||||
uint32 const FLAGS_EXTRA_COUNT = std::extent<decltype(flagsExtra)>::value;
|
||||
|
||||
bool HandleNpcSpawnGroup(ChatHandler* handler, char const* args)
|
||||
{
|
||||
if (!*args)
|
||||
@@ -801,9 +662,9 @@ public:
|
||||
handler->PSendSysMessage(LANG_NPCINFO_MOVEMENT_DATA, target->GetMovementTemplate().ToString().c_str());
|
||||
|
||||
handler->PSendSysMessage(LANG_NPCINFO_UNIT_FIELD_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS));
|
||||
for (uint8 i = 0; i < MAX_UNIT_FLAGS; ++i)
|
||||
if (target->GetUInt32Value(UNIT_FIELD_FLAGS) & unitFlags[i].Value)
|
||||
handler->PSendSysMessage("%s (0x%X)", unitFlags[i].Name, unitFlags[i].Value);
|
||||
for (UnitFlags flag : EnumUtils::Iterate<UnitFlags>())
|
||||
if (target->GetUInt32Value(UNIT_FIELD_FLAGS) & flag)
|
||||
handler->PSendSysMessage("* %s (0x%X)", EnumUtils::ToTitle(flag), flag);
|
||||
|
||||
handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS_2), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->GetFaction());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
|
||||
@@ -817,18 +678,18 @@ public:
|
||||
if (CreatureAI const* ai = target->AI())
|
||||
handler->PSendSysMessage(LANG_OBJECTINFO_AITYPE, boost::core::demangle(typeid(*ai).name()).c_str());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_FLAGS_EXTRA, cInfo->flags_extra);
|
||||
for (uint8 i = 0; i < FLAGS_EXTRA_COUNT; ++i)
|
||||
if (cInfo->flags_extra & flagsExtra[i].Value)
|
||||
handler->PSendSysMessage("%s (0x%X)", flagsExtra[i].Name, flagsExtra[i].Value);
|
||||
for (CreatureFlagsExtra flag : EnumUtils::Iterate<CreatureFlagsExtra>())
|
||||
if (cInfo->flags_extra & flag)
|
||||
handler->PSendSysMessage("* %s (0x%X)", EnumUtils::ToTitle(flag), flag);
|
||||
|
||||
for (uint8 i = 0; i < NPCFLAG_COUNT; i++)
|
||||
if (npcflags & npcFlagTexts[i].Value)
|
||||
handler->PSendSysMessage(npcFlagTexts[i].Name, npcFlagTexts[i].Value);
|
||||
for (NPCFlags flag : EnumUtils::Iterate<NPCFlags>())
|
||||
if (npcflags & flag)
|
||||
handler->PSendSysMessage("* %s (0x%X)", EnumUtils::ToTitle(flag), flag);
|
||||
|
||||
handler->PSendSysMessage(LANG_NPCINFO_MECHANIC_IMMUNE, mechanicImmuneMask);
|
||||
for (uint8 i = 1; i < MAX_MECHANIC; ++i)
|
||||
if (mechanicImmuneMask & (1 << (mechanicImmunes[i].Value - 1)))
|
||||
handler->PSendSysMessage("%s (0x%X)", mechanicImmunes[i].Name, mechanicImmunes[i].Value);
|
||||
for (Mechanics m : EnumUtils::Iterate<Mechanics>())
|
||||
if (m && (mechanicImmuneMask & (1 << (m-1))))
|
||||
handler->PSendSysMessage("* %s (0x%X)", EnumUtils::ToTitle(m), m);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -256,37 +256,37 @@ enum Stats
|
||||
STAT_AGILITY = 1,
|
||||
STAT_STAMINA = 2,
|
||||
STAT_INTELLECT = 3,
|
||||
STAT_SPIRIT = 4
|
||||
STAT_SPIRIT = 4,
|
||||
MAX_STATS
|
||||
};
|
||||
|
||||
#define MAX_STATS 5
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum Powers : int8
|
||||
{
|
||||
POWER_HEALTH = -2, // TITLE Health
|
||||
POWER_MANA = 0, // TITLE Mana
|
||||
POWER_RAGE = 1, // TITLE Rage
|
||||
POWER_FOCUS = 2, // TITLE Focus
|
||||
POWER_ENERGY = 3, // TITLE Energy
|
||||
POWER_HAPPINESS = 4, // TITLE Happiness
|
||||
POWER_RUNE = 5, // TITLE Runes
|
||||
POWER_RUNIC_POWER = 6, // TITLE Runic Power
|
||||
MAX_POWERS = 7, // SKIP
|
||||
POWER_ALL = 127 // SKIP
|
||||
};
|
||||
|
||||
SMART_ENUM((Powers, int8),
|
||||
(
|
||||
(POWER_HEALTH, -2, ("Health")),
|
||||
(POWER_ALL, 127, ("All powers")),
|
||||
(POWER_MANA, 0, ("Mana")),
|
||||
(POWER_RAGE, 1, ("Rage")),
|
||||
(POWER_FOCUS, 2, ("Focus")),
|
||||
(POWER_ENERGY, 3, ("Energy")),
|
||||
(POWER_HAPPINESS, 4, ("Happiness")),
|
||||
(POWER_RUNE, 5, ("Runes")),
|
||||
(POWER_RUNIC_POWER, 6, ("Runic Power"))
|
||||
));
|
||||
SMART_ENUM_BOUND(Powers, MAX_POWERS);
|
||||
|
||||
|
||||
SMART_ENUM(SpellSchools,
|
||||
(
|
||||
(SPELL_SCHOOL_NORMAL, 0, ("Physical")),
|
||||
(SPELL_SCHOOL_HOLY, 1, ("Holy")),
|
||||
(SPELL_SCHOOL_FIRE, 2, ("Fire")),
|
||||
(SPELL_SCHOOL_NATURE, 3, ("Nature")),
|
||||
(SPELL_SCHOOL_FROST, 4, ("Frost")),
|
||||
(SPELL_SCHOOL_SHADOW, 5, ("Shadow")),
|
||||
(SPELL_SCHOOL_ARCANE, 6, ("Arcane"))
|
||||
));
|
||||
SMART_ENUM_BOUND(SpellSchools, MAX_SPELL_SCHOOL);
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellSchools
|
||||
{
|
||||
SPELL_SCHOOL_NORMAL = 0, // TITLE Physical
|
||||
SPELL_SCHOOL_HOLY = 1, // TITLE Holy
|
||||
SPELL_SCHOOL_FIRE = 2, // TITLE Fire
|
||||
SPELL_SCHOOL_NATURE = 3, // TITLE Nature
|
||||
SPELL_SCHOOL_FROST = 4, // TITLE Frost
|
||||
SPELL_SCHOOL_SHADOW = 5, // TITLE Shadow
|
||||
SPELL_SCHOOL_ARCANE = 6, // TITLE Arcane
|
||||
MAX_SPELL_SCHOOL = 7 // SKIP
|
||||
};
|
||||
|
||||
enum SpellSchoolMask : uint32
|
||||
{
|
||||
@@ -312,14 +312,14 @@ enum SpellSchoolMask : uint32
|
||||
SPELL_SCHOOL_MASK_ALL = (SPELL_SCHOOL_MASK_NORMAL | SPELL_SCHOOL_MASK_MAGIC)
|
||||
};
|
||||
|
||||
inline constexpr SpellSchoolMask GetMaskForSchool(SpellSchools school)
|
||||
constexpr SpellSchoolMask GetMaskForSchool(SpellSchools school)
|
||||
{
|
||||
return SpellSchoolMask(1 << school);
|
||||
}
|
||||
|
||||
inline constexpr SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
|
||||
inline SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
|
||||
{
|
||||
for (SpellSchools school : EnumUtils<SpellSchools>::Iterate())
|
||||
for (SpellSchools school : EnumUtils::Iterate<SpellSchools>())
|
||||
if (mask & GetMaskForSchool(school))
|
||||
return school;
|
||||
|
||||
@@ -376,294 +376,301 @@ uint32 constexpr QuestDifficultyColors[MAX_QUEST_DIFFICULTY] = {
|
||||
// Spell Attributes definitions
|
||||
// ***********************************
|
||||
|
||||
SMART_ENUM((SpellAttr0, uint32),
|
||||
(
|
||||
(SPELL_ATTR0_UNK0, 0x00000001),
|
||||
(SPELL_ATTR0_REQ_AMMO, 0x00000002, ("1 on next ranged")),
|
||||
(SPELL_ATTR0_ON_NEXT_SWING, 0x00000004),
|
||||
(SPELL_ATTR0_IS_REPLENISHMENT, 0x00000008, ("3 not set in 3.0.3")),
|
||||
(SPELL_ATTR0_ABILITY, 0x00000010, ("4 client puts 'ability' instead of 'spell' in game strings for these spells")),
|
||||
(SPELL_ATTR0_TRADESPELL, 0x00000020, ("5 trade spells (recipes), will be added by client to a sublist of profession spell")),
|
||||
(SPELL_ATTR0_PASSIVE, 0x00000040, ("6 Passive spell")),
|
||||
(SPELL_ATTR0_HIDDEN_CLIENTSIDE, 0x00000080, ("7 Spells with this attribute are not visible in spellbook or aura bar")),
|
||||
(SPELL_ATTR0_HIDE_IN_COMBAT_LOG, 0x00000100, ("8 This attribite controls whether spell appears in combat logs")),
|
||||
(SPELL_ATTR0_TARGET_MAINHAND_ITEM, 0x00000200, ("9 Client automatically selects item from mainhand slot as a cast target")),
|
||||
(SPELL_ATTR0_ON_NEXT_SWING_2, 0x00000400, ""),
|
||||
(SPELL_ATTR0_UNK11, 0x00000800, ""),
|
||||
(SPELL_ATTR0_DAYTIME_ONLY, 0x00001000, ("12 only useable at daytime, not set in 2.4.2")),
|
||||
(SPELL_ATTR0_NIGHT_ONLY, 0x00002000, ("13 only useable at night, not set in 2.4.2")),
|
||||
(SPELL_ATTR0_INDOORS_ONLY, 0x00004000, ("14 only useable indoors, not set in 2.4.2")),
|
||||
(SPELL_ATTR0_OUTDOORS_ONLY, 0x00008000, ("15 Only useable outdoors.")),
|
||||
(SPELL_ATTR0_NOT_SHAPESHIFT, 0x00010000, ("16 Not while shapeshifted")),
|
||||
(SPELL_ATTR0_ONLY_STEALTHED, 0x00020000, ("17 Must be in stealth")),
|
||||
(SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE, 0x00040000, ("18 client won't hide unit weapons in sheath on cast/channel")),
|
||||
(SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION, 0x00080000, ("19 spelldamage depends on caster level")),
|
||||
(SPELL_ATTR0_STOP_ATTACK_TARGET, 0x00100000, ("20 Stop attack after use this spell (and not begin attack if use)")),
|
||||
(SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK, 0x00200000, ("21 Cannot be dodged/parried/blocked")),
|
||||
(SPELL_ATTR0_CAST_TRACK_TARGET, 0x00400000, ("22 Client automatically forces player to face target when casting")),
|
||||
(SPELL_ATTR0_CASTABLE_WHILE_DEAD, 0x00800000, ("23 castable while dead?")),
|
||||
(SPELL_ATTR0_CASTABLE_WHILE_MOUNTED, 0x01000000, ("24 castable while mounted")),
|
||||
(SPELL_ATTR0_DISABLED_WHILE_ACTIVE, 0x02000000, ("25 Activate and start cooldown after aura fade or remove summoned creature or go")),
|
||||
(SPELL_ATTR0_NEGATIVE_1, 0x04000000, ("26 Many negative spells have this attr")),
|
||||
(SPELL_ATTR0_CASTABLE_WHILE_SITTING, 0x08000000, ("27 castable while sitting")),
|
||||
(SPELL_ATTR0_CANT_USED_IN_COMBAT, 0x10000000, ("28 Cannot be used in combat")),
|
||||
(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY, 0x20000000, ("29 unaffected by invulnerability (hmm possible not...)")),
|
||||
(SPELL_ATTR0_HEARTBEAT_RESIST_CHECK, 0x40000000, ("30 random chance the effect will end TODO: implement core support")),
|
||||
(SPELL_ATTR0_CANT_CANCEL, 0x80000000, ("31 positive aura can't be canceled"))
|
||||
)
|
||||
);
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellAttr0
|
||||
{
|
||||
SPELL_ATTR0_UNK0 = 0x00000001, // 0
|
||||
SPELL_ATTR0_REQ_AMMO = 0x00000002, // 1 on next ranged
|
||||
SPELL_ATTR0_ON_NEXT_SWING = 0x00000004, // 2
|
||||
SPELL_ATTR0_IS_REPLENISHMENT = 0x00000008, // 3 not set in 3.0.3
|
||||
SPELL_ATTR0_ABILITY = 0x00000010, // 4 client puts 'ability' instead of 'spell' in game strings for these spells
|
||||
SPELL_ATTR0_TRADESPELL = 0x00000020, // 5 trade spells (recipes), will be added by client to a sublist of profession spell
|
||||
SPELL_ATTR0_PASSIVE = 0x00000040, // 6 Passive spell
|
||||
SPELL_ATTR0_HIDDEN_CLIENTSIDE = 0x00000080, // 7 Spells with this attribute are not visible in spellbook or aura bar
|
||||
SPELL_ATTR0_HIDE_IN_COMBAT_LOG = 0x00000100, // 8 This attribite controls whether spell appears in combat logs
|
||||
SPELL_ATTR0_TARGET_MAINHAND_ITEM = 0x00000200, // 9 Client automatically selects item from mainhand slot as a cast target
|
||||
SPELL_ATTR0_ON_NEXT_SWING_2 = 0x00000400, // 10
|
||||
SPELL_ATTR0_UNK11 = 0x00000800, // 11
|
||||
SPELL_ATTR0_DAYTIME_ONLY = 0x00001000, // 12 only useable at daytime, not set in 2.4.2
|
||||
SPELL_ATTR0_NIGHT_ONLY = 0x00002000, // 13 only useable at night, not set in 2.4.2
|
||||
SPELL_ATTR0_INDOORS_ONLY = 0x00004000, // 14 only useable indoors, not set in 2.4.2
|
||||
SPELL_ATTR0_OUTDOORS_ONLY = 0x00008000, // 15 Only useable outdoors.
|
||||
SPELL_ATTR0_NOT_SHAPESHIFT = 0x00010000, // 16 Not while shapeshifted
|
||||
SPELL_ATTR0_ONLY_STEALTHED = 0x00020000, // 17 Must be in stealth
|
||||
SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE = 0x00040000, // 18 client won't hide unit weapons in sheath on cast/channel
|
||||
SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION = 0x00080000, // 19 spelldamage depends on caster level
|
||||
SPELL_ATTR0_STOP_ATTACK_TARGET = 0x00100000, // 20 Stop attack after use this spell (and not begin attack if use)
|
||||
SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK = 0x00200000, // 21 Cannot be dodged/parried/blocked
|
||||
SPELL_ATTR0_CAST_TRACK_TARGET = 0x00400000, // 22 Client automatically forces player to face target when casting
|
||||
SPELL_ATTR0_CASTABLE_WHILE_DEAD = 0x00800000, // 23 castable while dead?
|
||||
SPELL_ATTR0_CASTABLE_WHILE_MOUNTED = 0x01000000, // 24 castable while mounted
|
||||
SPELL_ATTR0_DISABLED_WHILE_ACTIVE = 0x02000000, // 25 Activate and start cooldown after aura fade or remove summoned creature or go
|
||||
SPELL_ATTR0_NEGATIVE_1 = 0x04000000, // 26 Many negative spells have this attr
|
||||
SPELL_ATTR0_CASTABLE_WHILE_SITTING = 0x08000000, // 27 castable while sitting
|
||||
SPELL_ATTR0_CANT_USED_IN_COMBAT = 0x10000000, // 28 Cannot be used in combat
|
||||
SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY = 0x20000000, // 29 unaffected by invulnerability (hmm possible not...)
|
||||
SPELL_ATTR0_HEARTBEAT_RESIST_CHECK = 0x40000000, // 30 random chance the effect will end TODO: implement core support
|
||||
SPELL_ATTR0_CANT_CANCEL = 0x80000000 // 31 positive aura can't be canceled
|
||||
};
|
||||
|
||||
SMART_ENUM((SpellAttr1, uint32),
|
||||
(
|
||||
(SPELL_ATTR1_DISMISS_PET, 0x00000001, ("0 for spells without this flag client doesn't allow to summon pet if caster has a pet")),
|
||||
(SPELL_ATTR1_DRAIN_ALL_POWER, 0x00000002, ("1 use all power (Only paladin Lay of Hands and Bunyanize)")),
|
||||
(SPELL_ATTR1_CHANNELED_1, 0x00000004, ("2 clientside checked? cancelable?")),
|
||||
(SPELL_ATTR1_CANT_BE_REDIRECTED, 0x00000008, ("3")),
|
||||
(SPELL_ATTR1_UNK4, 0x00000010, ("4 stealth and whirlwind")),
|
||||
(SPELL_ATTR1_NOT_BREAK_STEALTH, 0x00000020, ("5 Not break stealth")),
|
||||
(SPELL_ATTR1_CHANNELED_2, 0x00000040, ("6")),
|
||||
(SPELL_ATTR1_CANT_BE_REFLECTED, 0x00000080, ("7")),
|
||||
(SPELL_ATTR1_CANT_TARGET_IN_COMBAT, 0x00000100, ("8 can target only out of combat units")),
|
||||
(SPELL_ATTR1_MELEE_COMBAT_START, 0x00000200, ("9 player starts melee combat after this spell is cast")),
|
||||
(SPELL_ATTR1_NO_THREAT, 0x00000400, ("10 no generates threat on cast 100% (old NO_INITIAL_AGGRO)")),
|
||||
(SPELL_ATTR1_UNK11, 0x00000800, ("11 aura")),
|
||||
(SPELL_ATTR1_IS_PICKPOCKET, 0x00001000, ("12 Pickpocket")),
|
||||
(SPELL_ATTR1_FARSIGHT, 0x00002000, ("13 Client removes farsight on aura loss")),
|
||||
(SPELL_ATTR1_CHANNEL_TRACK_TARGET, 0x00004000, ("14 Client automatically forces player to face target when channeling")),
|
||||
(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY, 0x00008000, ("15 remove auras on immunity")),
|
||||
(SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE, 0x00010000, ("16 on immuniy")),
|
||||
(SPELL_ATTR1_UNAUTOCASTABLE_BY_PET, 0x00020000, ("17")),
|
||||
(SPELL_ATTR1_UNK18, 0x00040000, ("18 stun, polymorph, daze, hex")),
|
||||
(SPELL_ATTR1_CANT_TARGET_SELF, 0x00080000, ("19")),
|
||||
(SPELL_ATTR1_REQ_COMBO_POINTS1, 0x00100000, ("20 Req combo points on target")),
|
||||
(SPELL_ATTR1_UNK21, 0x00200000, ("21")),
|
||||
(SPELL_ATTR1_REQ_COMBO_POINTS2, 0x00400000, ("22 Req combo points on target")),
|
||||
(SPELL_ATTR1_UNK23, 0x00800000, ("23")),
|
||||
(SPELL_ATTR1_IS_FISHING, 0x01000000, ("24 only fishing spells")),
|
||||
(SPELL_ATTR1_UNK25, 0x02000000, ("25")),
|
||||
(SPELL_ATTR1_UNK26, 0x04000000, ("26 works correctly with [target=focus] and [target=mouseover] macros?")),
|
||||
(SPELL_ATTR1_UNK27, 0x08000000, ("27 melee spell?")),
|
||||
(SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR, 0x10000000, ("28 client doesn't display these spells in aura bar")),
|
||||
(SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME, 0x20000000, ("29 spell name is displayed in cast bar instead of 'channeling' text")),
|
||||
(SPELL_ATTR1_ENABLE_AT_DODGE, 0x40000000, ("30 Overpower")),
|
||||
(SPELL_ATTR1_UNK31, 0x80000000, ("31"))
|
||||
));
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellAttr1
|
||||
{
|
||||
SPELL_ATTR1_DISMISS_PET = 0x00000001, // 0 for spells without this flag client doesn't allow to summon pet if caster has a pet
|
||||
SPELL_ATTR1_DRAIN_ALL_POWER = 0x00000002, // 1 use all power (Only paladin Lay of Hands and Bunyanize)
|
||||
SPELL_ATTR1_CHANNELED_1 = 0x00000004, // 2 clientside checked? cancelable?
|
||||
SPELL_ATTR1_CANT_BE_REDIRECTED = 0x00000008, // 3
|
||||
SPELL_ATTR1_UNK4 = 0x00000010, // 4 stealth and whirlwind
|
||||
SPELL_ATTR1_NOT_BREAK_STEALTH = 0x00000020, // 5 Not break stealth
|
||||
SPELL_ATTR1_CHANNELED_2 = 0x00000040, // 6
|
||||
SPELL_ATTR1_CANT_BE_REFLECTED = 0x00000080, // 7
|
||||
SPELL_ATTR1_CANT_TARGET_IN_COMBAT = 0x00000100, // 8 can target only out of combat units
|
||||
SPELL_ATTR1_MELEE_COMBAT_START = 0x00000200, // 9 player starts melee combat after this spell is cast
|
||||
SPELL_ATTR1_NO_THREAT = 0x00000400, // 10 no generates threat on cast 100% (old NO_INITIAL_AGGRO)
|
||||
SPELL_ATTR1_UNK11 = 0x00000800, // 11 aura
|
||||
SPELL_ATTR1_IS_PICKPOCKET = 0x00001000, // 12 Pickpocket
|
||||
SPELL_ATTR1_FARSIGHT = 0x00002000, // 13 Client removes farsight on aura loss
|
||||
SPELL_ATTR1_CHANNEL_TRACK_TARGET = 0x00004000, // 14 Client automatically forces player to face target when channeling
|
||||
SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY = 0x00008000, // 15 remove auras on immunity
|
||||
SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE = 0x00010000, // 16 on immuniy
|
||||
SPELL_ATTR1_UNAUTOCASTABLE_BY_PET = 0x00020000, // 17
|
||||
SPELL_ATTR1_UNK18 = 0x00040000, // 18 stun, polymorph, daze, hex
|
||||
SPELL_ATTR1_CANT_TARGET_SELF = 0x00080000, // 19
|
||||
SPELL_ATTR1_REQ_COMBO_POINTS1 = 0x00100000, // 20 Req combo points on target
|
||||
SPELL_ATTR1_UNK21 = 0x00200000, // 21
|
||||
SPELL_ATTR1_REQ_COMBO_POINTS2 = 0x00400000, // 22 Req combo points on target
|
||||
SPELL_ATTR1_UNK23 = 0x00800000, // 23
|
||||
SPELL_ATTR1_IS_FISHING = 0x01000000, // 24 only fishing spells
|
||||
SPELL_ATTR1_UNK25 = 0x02000000, // 25
|
||||
SPELL_ATTR1_UNK26 = 0x04000000, // 26 works correctly with [target=focus] and [target=mouseover] macros?
|
||||
SPELL_ATTR1_UNK27 = 0x08000000, // 27 melee spell?
|
||||
SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR = 0x10000000, // 28 client doesn't display these spells in aura bar
|
||||
SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME = 0x20000000, // 29 spell name is displayed in cast bar instead of 'channeling' text
|
||||
SPELL_ATTR1_ENABLE_AT_DODGE = 0x40000000, // 30 Overpower
|
||||
SPELL_ATTR1_UNK31 = 0x80000000 // 31
|
||||
};
|
||||
|
||||
SMART_ENUM((SpellAttr2, uint32),
|
||||
(
|
||||
(SPELL_ATTR2_CAN_TARGET_DEAD, 0x00000001, ("0 can target dead unit or corpse")),
|
||||
(SPELL_ATTR2_UNK1, 0x00000002, ("1 vanish, shadowform, Ghost Wolf and other")),
|
||||
(SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS, 0x00000004, ("2 26368 4.0.1 dbc change")),
|
||||
(SPELL_ATTR2_UNK3, 0x00000008, ("3")),
|
||||
(SPELL_ATTR2_DISPLAY_IN_STANCE_BAR, 0x00000010, ("4 client displays icon in stance bar when learned, even if not shapeshift")),
|
||||
(SPELL_ATTR2_AUTOREPEAT_FLAG, 0x00000020, ("5")),
|
||||
(SPELL_ATTR2_CANT_TARGET_TAPPED, 0x00000040, ("6 target must be tapped by caster")),
|
||||
(SPELL_ATTR2_UNK7, 0x00000080, ("7")),
|
||||
(SPELL_ATTR2_UNK8, 0x00000100, ("8 not set in 3.0.3")),
|
||||
(SPELL_ATTR2_UNK9, 0x00000200, ("9")),
|
||||
(SPELL_ATTR2_UNK10, 0x00000400, ("10 related to tame")),
|
||||
(SPELL_ATTR2_HEALTH_FUNNEL, 0x00000800, ("11")),
|
||||
(SPELL_ATTR2_UNK12, 0x00001000, ("12 Cleave, Heart Strike, Maul, Sunder Armor, Swipe")),
|
||||
(SPELL_ATTR2_PRESERVE_ENCHANT_IN_ARENA, 0x00002000, ("13 Items enchanted by spells with this flag preserve the enchant to arenas")),
|
||||
(SPELL_ATTR2_UNK14, 0x00004000, ("14")),
|
||||
(SPELL_ATTR2_UNK15, 0x00008000, ("15 not set in 3.0.3")),
|
||||
(SPELL_ATTR2_TAME_BEAST, 0x00010000, ("16")),
|
||||
(SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS, 0x00020000, ("17 don't reset timers for melee autoattacks (swings) or ranged autoattacks (autoshoots)")),
|
||||
(SPELL_ATTR2_REQ_DEAD_PET, 0x00040000, ("18 Only Revive pet and Heart of the Pheonix")),
|
||||
(SPELL_ATTR2_NOT_NEED_SHAPESHIFT, 0x00080000, ("19 does not necessarly need shapeshift")),
|
||||
(SPELL_ATTR2_UNK20, 0x00100000, ("20")),
|
||||
(SPELL_ATTR2_DAMAGE_REDUCED_SHIELD, 0x00200000, ("21 for ice blocks, pala immunity buffs, priest absorb shields, but used also for other spells -> not sure!")),
|
||||
(SPELL_ATTR2_UNK22, 0x00400000, ("22 Ambush, Backstab, Cheap Shot, Death Grip, Garrote, Judgements, Mutilate, Pounce, Ravage, Shiv, Shred")),
|
||||
(SPELL_ATTR2_IS_ARCANE_CONCENTRATION, 0x00800000, ("23 Only mage Arcane Concentration have this flag")),
|
||||
(SPELL_ATTR2_UNK24, 0x01000000, ("24")),
|
||||
(SPELL_ATTR2_UNK25, 0x02000000, ("25")),
|
||||
(SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE, 0x04000000, ("26 unaffected by school immunity")),
|
||||
(SPELL_ATTR2_UNK27, 0x08000000, ("27")),
|
||||
(SPELL_ATTR2_UNK28, 0x10000000, ("28")),
|
||||
(SPELL_ATTR2_CANT_CRIT, 0x20000000, ("29 Spell can't crit")),
|
||||
(SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC, 0x40000000, ("30 spell can trigger even if triggered")),
|
||||
(SPELL_ATTR2_FOOD_BUFF, 0x80000000, ("31 Food or Drink Buff (like Well Fed)"))
|
||||
));
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellAttr2
|
||||
{
|
||||
SPELL_ATTR2_CAN_TARGET_DEAD = 0x00000001, // 0 can target dead unit or corpse
|
||||
SPELL_ATTR2_UNK1 = 0x00000002, // 1 vanish, shadowform, Ghost Wolf and other
|
||||
SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS = 0x00000004, // 2 26368 4.0.1 dbc change
|
||||
SPELL_ATTR2_UNK3 = 0x00000008, // 3
|
||||
SPELL_ATTR2_DISPLAY_IN_STANCE_BAR = 0x00000010, // 4 client displays icon in stance bar when learned, even if not shapeshift
|
||||
SPELL_ATTR2_AUTOREPEAT_FLAG = 0x00000020, // 5
|
||||
SPELL_ATTR2_CANT_TARGET_TAPPED = 0x00000040, // 6 target must be tapped by caster
|
||||
SPELL_ATTR2_UNK7 = 0x00000080, // 7
|
||||
SPELL_ATTR2_UNK8 = 0x00000100, // 8 not set in 3.0.3
|
||||
SPELL_ATTR2_UNK9 = 0x00000200, // 9
|
||||
SPELL_ATTR2_UNK10 = 0x00000400, // 10 related to tame
|
||||
SPELL_ATTR2_HEALTH_FUNNEL = 0x00000800, // 11
|
||||
SPELL_ATTR2_UNK12 = 0x00001000, // 12 Cleave, Heart Strike, Maul, Sunder Armor, Swipe
|
||||
SPELL_ATTR2_PRESERVE_ENCHANT_IN_ARENA = 0x00002000, // 13 Items enchanted by spells with this flag preserve the enchant to arenas
|
||||
SPELL_ATTR2_UNK14 = 0x00004000, // 14
|
||||
SPELL_ATTR2_UNK15 = 0x00008000, // 15 not set in 3.0.3
|
||||
SPELL_ATTR2_TAME_BEAST = 0x00010000, // 16
|
||||
SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS = 0x00020000, // 17 don't reset timers for melee autoattacks (swings) or ranged autoattacks (autoshoots)
|
||||
SPELL_ATTR2_REQ_DEAD_PET = 0x00040000, // 18 Only Revive pet and Heart of the Pheonix
|
||||
SPELL_ATTR2_NOT_NEED_SHAPESHIFT = 0x00080000, // 19 does not necessarly need shapeshift
|
||||
SPELL_ATTR2_UNK20 = 0x00100000, // 20
|
||||
SPELL_ATTR2_DAMAGE_REDUCED_SHIELD = 0x00200000, // 21 for ice blocks, pala immunity buffs, priest absorb shields, but used also for other spells -> not sure!
|
||||
SPELL_ATTR2_UNK22 = 0x00400000, // 22 Ambush, Backstab, Cheap Shot, Death Grip, Garrote, Judgements, Mutilate, Pounce, Ravage, Shiv, Shred
|
||||
SPELL_ATTR2_IS_ARCANE_CONCENTRATION = 0x00800000, // 23 Only mage Arcane Concentration have this flag
|
||||
SPELL_ATTR2_UNK24 = 0x01000000, // 24
|
||||
SPELL_ATTR2_UNK25 = 0x02000000, // 25
|
||||
SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE = 0x04000000, // 26 unaffected by school immunity
|
||||
SPELL_ATTR2_UNK27 = 0x08000000, // 27
|
||||
SPELL_ATTR2_UNK28 = 0x10000000, // 28
|
||||
SPELL_ATTR2_CANT_CRIT = 0x20000000, // 29 Spell can't crit
|
||||
SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC = 0x40000000, // 30 spell can trigger even if triggered
|
||||
SPELL_ATTR2_FOOD_BUFF = 0x80000000 // 31 Food or Drink Buff (like Well Fed)
|
||||
};
|
||||
|
||||
SMART_ENUM((SpellAttr3, uint32),
|
||||
(
|
||||
(SPELL_ATTR3_UNK0, 0x00000001, ("0")),
|
||||
(SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK, 0x00000002, ("1 Ignores subclass mask check when checking proc")),
|
||||
(SPELL_ATTR3_UNK2, 0x00000004, ("2")),
|
||||
(SPELL_ATTR3_BLOCKABLE_SPELL, 0x00000008, ("3 Only dmg class melee in 3.1.3")),
|
||||
(SPELL_ATTR3_IGNORE_RESURRECTION_TIMER, 0x00000010, ("4 you don't have to wait to be resurrected with these spells")),
|
||||
(SPELL_ATTR3_UNK5, 0x00000020, ("5")),
|
||||
(SPELL_ATTR3_UNK6, 0x00000040, ("6")),
|
||||
(SPELL_ATTR3_STACK_FOR_DIFF_CASTERS, 0x00000080, ("7 separate stack for every caster")),
|
||||
(SPELL_ATTR3_ONLY_TARGET_PLAYERS, 0x00000100, ("8 can only target players")),
|
||||
(SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2, 0x00000200, ("9 triggered from effect?")),
|
||||
(SPELL_ATTR3_MAIN_HAND, 0x00000400, ("10 Main hand weapon required")),
|
||||
(SPELL_ATTR3_BATTLEGROUND, 0x00000800, ("11 Can only be cast in battleground")),
|
||||
(SPELL_ATTR3_ONLY_TARGET_GHOSTS, 0x00001000, ("12")),
|
||||
(SPELL_ATTR3_DONT_DISPLAY_CHANNEL_BAR, 0x00002000, ("13 Clientside attribute - will not display channeling bar")),
|
||||
(SPELL_ATTR3_IS_HONORLESS_TARGET, 0x00004000, ("14 'Honorless Target' only this spells have this flag")),
|
||||
(SPELL_ATTR3_UNK15, 0x00008000, ("15 Auto Shoot, Shoot, Throw, - this is autoshot flag")),
|
||||
(SPELL_ATTR3_CANT_TRIGGER_PROC, 0x00010000, ("16 confirmed with many patchnotes")),
|
||||
(SPELL_ATTR3_NO_INITIAL_AGGRO, 0x00020000, ("17 Soothe Animal, 39758, Mind Soothe")),
|
||||
(SPELL_ATTR3_IGNORE_HIT_RESULT, 0x00040000, ("18 Spell should always hit its target")),
|
||||
(SPELL_ATTR3_DISABLE_PROC, 0x00080000, ("19 during aura proc no spells can trigger (20178, 20375)")),
|
||||
(SPELL_ATTR3_DEATH_PERSISTENT, 0x00100000, ("20 Death persistent spells")),
|
||||
(SPELL_ATTR3_UNK21, 0x00200000, ("21 unused")),
|
||||
(SPELL_ATTR3_REQ_WAND, 0x00400000, ("22 Req wand")),
|
||||
(SPELL_ATTR3_UNK23, 0x00800000, ("23")),
|
||||
(SPELL_ATTR3_REQ_OFFHAND, 0x01000000, ("24 Req offhand weapon")),
|
||||
(SPELL_ATTR3_TREAT_AS_PERIODIC, 0x02000000, ("25 Makes the spell appear as periodic in client combat logs - used by spells that trigger another spell on each tick")),
|
||||
(SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED, 0x04000000, ("26 auras with this attribute can proc from triggered spell casts with SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 (67736 + 52999)")),
|
||||
(SPELL_ATTR3_DRAIN_SOUL, 0x08000000, ("27 only drain soul has this flag")),
|
||||
(SPELL_ATTR3_UNK28, 0x10000000, ("28")),
|
||||
(SPELL_ATTR3_NO_DONE_BONUS, 0x20000000, ("29 Ignore caster spellpower and done damage mods? client doesn't apply spellmods for those spells")),
|
||||
(SPELL_ATTR3_DONT_DISPLAY_RANGE, 0x40000000, ("30 client doesn't display range in tooltip for those spells")),
|
||||
(SPELL_ATTR3_UNK31, 0x80000000, ("31"))
|
||||
));
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellAttr3
|
||||
{
|
||||
SPELL_ATTR3_UNK0 = 0x00000001, // 0
|
||||
SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK = 0x00000002, // 1 Ignores subclass mask check when checking proc
|
||||
SPELL_ATTR3_UNK2 = 0x00000004, // 2
|
||||
SPELL_ATTR3_BLOCKABLE_SPELL = 0x00000008, // 3 Only dmg class melee in 3.1.3
|
||||
SPELL_ATTR3_IGNORE_RESURRECTION_TIMER = 0x00000010, // 4 you don't have to wait to be resurrected with these spells
|
||||
SPELL_ATTR3_UNK5 = 0x00000020, // 5
|
||||
SPELL_ATTR3_UNK6 = 0x00000040, // 6
|
||||
SPELL_ATTR3_STACK_FOR_DIFF_CASTERS = 0x00000080, // 7 separate stack for every caster
|
||||
SPELL_ATTR3_ONLY_TARGET_PLAYERS = 0x00000100, // 8 can only target players
|
||||
SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 = 0x00000200, // 9 triggered from effect?
|
||||
SPELL_ATTR3_MAIN_HAND = 0x00000400, // 10 Main hand weapon required
|
||||
SPELL_ATTR3_BATTLEGROUND = 0x00000800, // 11 Can only be cast in battleground
|
||||
SPELL_ATTR3_ONLY_TARGET_GHOSTS = 0x00001000, // 12
|
||||
SPELL_ATTR3_DONT_DISPLAY_CHANNEL_BAR = 0x00002000, // 13 Clientside attribute - will not display channeling bar
|
||||
SPELL_ATTR3_IS_HONORLESS_TARGET = 0x00004000, // 14 "Honorless Target" only this spells have this flag
|
||||
SPELL_ATTR3_UNK15 = 0x00008000, // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag
|
||||
SPELL_ATTR3_CANT_TRIGGER_PROC = 0x00010000, // 16 confirmed with many patchnotes
|
||||
SPELL_ATTR3_NO_INITIAL_AGGRO = 0x00020000, // 17 Soothe Animal, 39758, Mind Soothe
|
||||
SPELL_ATTR3_IGNORE_HIT_RESULT = 0x00040000, // 18 Spell should always hit its target
|
||||
SPELL_ATTR3_DISABLE_PROC = 0x00080000, // 19 during aura proc no spells can trigger (20178, 20375)
|
||||
SPELL_ATTR3_DEATH_PERSISTENT = 0x00100000, // 20 Death persistent spells
|
||||
SPELL_ATTR3_UNK21 = 0x00200000, // 21 unused
|
||||
SPELL_ATTR3_REQ_WAND = 0x00400000, // 22 Req wand
|
||||
SPELL_ATTR3_UNK23 = 0x00800000, // 23
|
||||
SPELL_ATTR3_REQ_OFFHAND = 0x01000000, // 24 Req offhand weapon
|
||||
SPELL_ATTR3_TREAT_AS_PERIODIC = 0x02000000, // 25 Makes the spell appear as periodic in client combat logs - used by spells that trigger another spell on each tick
|
||||
SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED = 0x04000000, // 26 auras with this attribute can proc from triggered spell casts with SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 (67736 + 52999)
|
||||
SPELL_ATTR3_DRAIN_SOUL = 0x08000000, // 27 only drain soul has this flag
|
||||
SPELL_ATTR3_UNK28 = 0x10000000, // 28
|
||||
SPELL_ATTR3_NO_DONE_BONUS = 0x20000000, // 29 Ignore caster spellpower and done damage mods? client doesn't apply spellmods for those spells
|
||||
SPELL_ATTR3_DONT_DISPLAY_RANGE = 0x40000000, // 30 client doesn't display range in tooltip for those spells
|
||||
SPELL_ATTR3_UNK31 = 0x80000000 // 31
|
||||
};
|
||||
|
||||
SMART_ENUM((SpellAttr4, uint32),
|
||||
(
|
||||
(SPELL_ATTR4_IGNORE_RESISTANCES, 0x00000001, ("0 spells with this attribute will completely ignore the target's resistance (these spells can't be resisted)")),
|
||||
(SPELL_ATTR4_PROC_ONLY_ON_CASTER, 0x00000002, ("1 proc only on effects with TARGET_UNIT_CASTER?")),
|
||||
(SPELL_ATTR4_FADES_WHILE_LOGGED_OUT, 0x00000004, ("2 duration is removed from aura while player is logged out")),
|
||||
(SPELL_ATTR4_UNK3, 0x00000008, ("3")),
|
||||
(SPELL_ATTR4_UNK4, 0x00000010, ("4 This will no longer cause guards to attack on use??")),
|
||||
(SPELL_ATTR4_UNK5, 0x00000020, ("5")),
|
||||
(SPELL_ATTR4_NOT_STEALABLE, 0x00000040, ("6 although such auras might be dispellable, they cannot be stolen")),
|
||||
(SPELL_ATTR4_CAN_CAST_WHILE_CASTING, 0x00000080, ("7 Can be cast while another cast is in progress - see CanCastWhileCasting(SpellRec const*,CGUnit_C *,int &)")),
|
||||
(SPELL_ATTR4_FIXED_DAMAGE, 0x00000100, ("8 Ignores resilience and any (except mechanic related) damage or % damage taken auras on target.")),
|
||||
(SPELL_ATTR4_TRIGGER_ACTIVATE, 0x00000200, ("9 initially disabled / trigger activate from event (Execute, Riposte, Deep Freeze end other)")),
|
||||
(SPELL_ATTR4_SPELL_VS_EXTEND_COST, 0x00000400, ("10 Rogue Shiv have this flag")),
|
||||
(SPELL_ATTR4_UNK11, 0x00000800, ("11")),
|
||||
(SPELL_ATTR4_UNK12, 0x00001000, ("12")),
|
||||
(SPELL_ATTR4_UNK13, 0x00002000, ("13")),
|
||||
(SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS, 0x00004000, ("14 doesn't break auras by damage from these spells")),
|
||||
(SPELL_ATTR4_UNK15, 0x00008000, ("15")),
|
||||
(SPELL_ATTR4_NOT_USABLE_IN_ARENA, 0x00010000, ("16")),
|
||||
(SPELL_ATTR4_USABLE_IN_ARENA, 0x00020000, ("17")),
|
||||
(SPELL_ATTR4_AREA_TARGET_CHAIN, 0x00040000, ("18 (NYI)hits area targets one after another instead of all at once")),
|
||||
(SPELL_ATTR4_UNK19, 0x00080000, ("19 proc dalayed, after damage or don't proc on absorb?")),
|
||||
(SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER, 0x00100000, ("20 supersedes message 'More powerful spell applied' for self casts.")),
|
||||
(SPELL_ATTR4_UNK21, 0x00200000, ("21 Pally aura, dk presence, dudu form, warrior stance, shadowform, hunter track")),
|
||||
(SPELL_ATTR4_UNK22, 0x00400000, ("22 Seal of Command (42058, 57770) and Gymer's Smash 55426")),
|
||||
(SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS, 0x00800000, ("23 spells with this flag should not trigger item spells / enchants (mostly in conjunction with SPELL_ATTR0_STOP_ATTACK_TARGET)")),
|
||||
(SPELL_ATTR4_UNK24, 0x01000000, ("24 some shoot spell")),
|
||||
(SPELL_ATTR4_IS_PET_SCALING, 0x02000000, ("25 pet scaling auras")),
|
||||
(SPELL_ATTR4_CAST_ONLY_IN_OUTLAND, 0x04000000, ("26 Can only be used in Outland.")),
|
||||
(SPELL_ATTR4_INHERIT_CRIT_FROM_AURA, 0x08000000, ("27 Volley, Arcane Missiles, Penance -> related to critical on channeled periodical damage spell")),
|
||||
(SPELL_ATTR4_UNK28, 0x10000000, ("28 Aimed Shot")),
|
||||
(SPELL_ATTR4_UNK29, 0x20000000, ("29")),
|
||||
(SPELL_ATTR4_UNK30, 0x40000000, ("30")),
|
||||
(SPELL_ATTR4_UNK31, 0x80000000, ("31 Polymorph (chicken) 228 and Sonic Boom (38052, 38488)"))
|
||||
));
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellAttr4
|
||||
{
|
||||
SPELL_ATTR4_IGNORE_RESISTANCES = 0x00000001, // 0 spells with this attribute will completely ignore the target's resistance (these spells can't be resisted)
|
||||
SPELL_ATTR4_PROC_ONLY_ON_CASTER = 0x00000002, // 1 proc only on effects with TARGET_UNIT_CASTER?
|
||||
SPELL_ATTR4_FADES_WHILE_LOGGED_OUT = 0x00000004, // 2 duration is removed from aura while player is logged out
|
||||
SPELL_ATTR4_UNK3 = 0x00000008, // 3
|
||||
SPELL_ATTR4_UNK4 = 0x00000010, // 4 This will no longer cause guards to attack on use??
|
||||
SPELL_ATTR4_UNK5 = 0x00000020, // 5
|
||||
SPELL_ATTR4_NOT_STEALABLE = 0x00000040, // 6 although such auras might be dispellable, they cannot be stolen
|
||||
SPELL_ATTR4_CAN_CAST_WHILE_CASTING = 0x00000080, // 7 Can be cast while another cast is in progress - see CanCastWhileCasting(SpellRec const*,CGUnit_C *,int &)
|
||||
SPELL_ATTR4_FIXED_DAMAGE = 0x00000100, // 8 Ignores resilience and any (except mechanic related) damage or % damage taken auras on target.
|
||||
SPELL_ATTR4_TRIGGER_ACTIVATE = 0x00000200, // 9 initially disabled / trigger activate from event (Execute, Riposte, Deep Freeze end other)
|
||||
SPELL_ATTR4_SPELL_VS_EXTEND_COST = 0x00000400, // 10 Rogue Shiv have this flag
|
||||
SPELL_ATTR4_UNK11 = 0x00000800, // 11
|
||||
SPELL_ATTR4_UNK12 = 0x00001000, // 12
|
||||
SPELL_ATTR4_UNK13 = 0x00002000, // 13
|
||||
SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS = 0x00004000, // 14 doesn't break auras by damage from these spells
|
||||
SPELL_ATTR4_UNK15 = 0x00008000, // 15
|
||||
SPELL_ATTR4_NOT_USABLE_IN_ARENA = 0x00010000, // 16
|
||||
SPELL_ATTR4_USABLE_IN_ARENA = 0x00020000, // 17
|
||||
SPELL_ATTR4_AREA_TARGET_CHAIN = 0x00040000, // 18 (NYI)hits area targets one after another instead of all at once
|
||||
SPELL_ATTR4_UNK19 = 0x00080000, // 19 proc dalayed, after damage or don't proc on absorb?
|
||||
SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER = 0x00100000, // 20 supersedes message "More powerful spell applied" for self casts.
|
||||
SPELL_ATTR4_UNK21 = 0x00200000, // 21 Pally aura, dk presence, dudu form, warrior stance, shadowform, hunter track
|
||||
SPELL_ATTR4_UNK22 = 0x00400000, // 22 Seal of Command (42058, 57770) and Gymer's Smash 55426
|
||||
SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS = 0x00800000, // 23 spells with this flag should not trigger item spells / enchants (mostly in conjunction with SPELL_ATTR0_STOP_ATTACK_TARGET)
|
||||
SPELL_ATTR4_UNK24 = 0x01000000, // 24 some shoot spell
|
||||
SPELL_ATTR4_IS_PET_SCALING = 0x02000000, // 25 pet scaling auras
|
||||
SPELL_ATTR4_CAST_ONLY_IN_OUTLAND = 0x04000000, // 26 Can only be used in Outland.
|
||||
SPELL_ATTR4_INHERIT_CRIT_FROM_AURA = 0x08000000, // 27 Volley, Arcane Missiles, Penance -> related to critical on channeled periodical damage spell
|
||||
SPELL_ATTR4_UNK28 = 0x10000000, // 28 Aimed Shot
|
||||
SPELL_ATTR4_UNK29 = 0x20000000, // 29
|
||||
SPELL_ATTR4_UNK30 = 0x40000000, // 30
|
||||
SPELL_ATTR4_UNK31 = 0x80000000 // 31 Polymorph (chicken) 228 and Sonic Boom (38052, 38488)
|
||||
};
|
||||
|
||||
SMART_ENUM((SpellAttr5, uint32),
|
||||
(
|
||||
(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING, 0x00000001, ("0 available casting channel spell when moving")),
|
||||
(SPELL_ATTR5_NO_REAGENT_WHILE_PREP, 0x00000002, ("1 not need reagents if UNIT_FLAG_PREPARATION")),
|
||||
(SPELL_ATTR5_REMOVE_ON_ARENA_ENTER, 0x00000004, ("2 remove this aura on arena enter")),
|
||||
(SPELL_ATTR5_USABLE_WHILE_STUNNED, 0x00000008, ("3 usable while stunned")),
|
||||
(SPELL_ATTR5_UNK4, 0x00000010, ("4")),
|
||||
(SPELL_ATTR5_SINGLE_TARGET_SPELL, 0x00000020, ("5 Only one target can be apply at a time")),
|
||||
(SPELL_ATTR5_UNK6, 0x00000040, ("6")),
|
||||
(SPELL_ATTR5_UNK7, 0x00000080, ("7")),
|
||||
(SPELL_ATTR5_UNK8, 0x00000100, ("8")),
|
||||
(SPELL_ATTR5_START_PERIODIC_AT_APPLY, 0x00000200, ("9 begin periodic tick at aura apply")),
|
||||
(SPELL_ATTR5_HIDE_DURATION, 0x00000400, ("10 do not send duration to client")),
|
||||
(SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET, 0x00000800, ("11 (NYI) uses target's target as target if original target not valid (intervene for example)")),
|
||||
(SPELL_ATTR5_UNK12, 0x00001000, ("12 Cleave related?")),
|
||||
(SPELL_ATTR5_HASTE_AFFECT_DURATION, 0x00002000, ("13 haste effects decrease duration of this")),
|
||||
(SPELL_ATTR5_UNK14, 0x00004000, ("14")),
|
||||
(SPELL_ATTR5_UNK15, 0x00008000, ("15 Inflits on multiple targets?")),
|
||||
(SPELL_ATTR5_UNK16, 0x00010000, ("16")),
|
||||
(SPELL_ATTR5_USABLE_WHILE_FEARED, 0x00020000, ("17 usable while feared")),
|
||||
(SPELL_ATTR5_USABLE_WHILE_CONFUSED, 0x00040000, ("18 usable while confused")),
|
||||
(SPELL_ATTR5_DONT_TURN_DURING_CAST, 0x00080000, ("19 Blocks caster's turning when casting (client does not automatically turn caster's model to face UNIT_FIELD_TARGET)")),
|
||||
(SPELL_ATTR5_UNK20, 0x00100000, ("20")),
|
||||
(SPELL_ATTR5_UNK21, 0x00200000, ("21")),
|
||||
(SPELL_ATTR5_UNK22, 0x00400000, ("22")),
|
||||
(SPELL_ATTR5_UNK23, 0x00800000, ("23")),
|
||||
(SPELL_ATTR5_UNK24, 0x01000000, ("24")),
|
||||
(SPELL_ATTR5_UNK25, 0x02000000, ("25")),
|
||||
(SPELL_ATTR5_SKIP_CHECKCAST_LOS_CHECK, 0x04000000, ("26 aoe related - Boulder, Cannon, Corpse Explosion, Fire Nova, Flames, Frost Bomb, Living Bomb, Seed of Corruption, Starfall, Thunder Clap, Volley")),
|
||||
(SPELL_ATTR5_DONT_SHOW_AURA_IF_SELF_CAST, 0x08000000, ("27 Auras with this attribute are not visible on units that are the caster")),
|
||||
(SPELL_ATTR5_DONT_SHOW_AURA_IF_NOT_SELF_CAST, 0x10000000, ("28 Auras with this attribute are not visible on units that are not the caster")),
|
||||
(SPELL_ATTR5_UNK29, 0x20000000, ("29")),
|
||||
(SPELL_ATTR5_UNK30, 0x40000000, ("30")),
|
||||
(SPELL_ATTR5_UNK31, 0x80000000, ("31 Forces all nearby enemies to focus attacks caster"))
|
||||
));
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellAttr5
|
||||
{
|
||||
SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING = 0x00000001, // 0 available casting channel spell when moving
|
||||
SPELL_ATTR5_NO_REAGENT_WHILE_PREP = 0x00000002, // 1 not need reagents if UNIT_FLAG_PREPARATION
|
||||
SPELL_ATTR5_REMOVE_ON_ARENA_ENTER = 0x00000004, // 2 remove this aura on arena enter
|
||||
SPELL_ATTR5_USABLE_WHILE_STUNNED = 0x00000008, // 3 usable while stunned
|
||||
SPELL_ATTR5_UNK4 = 0x00000010, // 4
|
||||
SPELL_ATTR5_SINGLE_TARGET_SPELL = 0x00000020, // 5 Only one target can be apply at a time
|
||||
SPELL_ATTR5_UNK6 = 0x00000040, // 6
|
||||
SPELL_ATTR5_UNK7 = 0x00000080, // 7
|
||||
SPELL_ATTR5_UNK8 = 0x00000100, // 8
|
||||
SPELL_ATTR5_START_PERIODIC_AT_APPLY = 0x00000200, // 9 begin periodic tick at aura apply
|
||||
SPELL_ATTR5_HIDE_DURATION = 0x00000400, // 10 do not send duration to client
|
||||
SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET = 0x00000800, // 11 (NYI) uses target's target as target if original target not valid (intervene for example)
|
||||
SPELL_ATTR5_UNK12 = 0x00001000, // 12 Cleave related?
|
||||
SPELL_ATTR5_HASTE_AFFECT_DURATION = 0x00002000, // 13 haste effects decrease duration of this
|
||||
SPELL_ATTR5_UNK14 = 0x00004000, // 14
|
||||
SPELL_ATTR5_UNK15 = 0x00008000, // 15 Inflits on multiple targets?
|
||||
SPELL_ATTR5_UNK16 = 0x00010000, // 16
|
||||
SPELL_ATTR5_USABLE_WHILE_FEARED = 0x00020000, // 17 usable while feared
|
||||
SPELL_ATTR5_USABLE_WHILE_CONFUSED = 0x00040000, // 18 usable while confused
|
||||
SPELL_ATTR5_DONT_TURN_DURING_CAST = 0x00080000, // 19 Blocks caster's turning when casting (client does not automatically turn caster's model to face UNIT_FIELD_TARGET)
|
||||
SPELL_ATTR5_UNK20 = 0x00100000, // 20
|
||||
SPELL_ATTR5_UNK21 = 0x00200000, // 21
|
||||
SPELL_ATTR5_UNK22 = 0x00400000, // 22
|
||||
SPELL_ATTR5_UNK23 = 0x00800000, // 23
|
||||
SPELL_ATTR5_UNK24 = 0x01000000, // 24
|
||||
SPELL_ATTR5_UNK25 = 0x02000000, // 25
|
||||
SPELL_ATTR5_SKIP_CHECKCAST_LOS_CHECK = 0x04000000, // 26 aoe related - Boulder, Cannon, Corpse Explosion, Fire Nova, Flames, Frost Bomb, Living Bomb, Seed of Corruption, Starfall, Thunder Clap, Volley
|
||||
SPELL_ATTR5_DONT_SHOW_AURA_IF_SELF_CAST = 0x08000000, // 27 Auras with this attribute are not visible on units that are the caster
|
||||
SPELL_ATTR5_DONT_SHOW_AURA_IF_NOT_SELF_CAST = 0x10000000, // 28 Auras with this attribute are not visible on units that are not the caster
|
||||
SPELL_ATTR5_UNK29 = 0x20000000, // 29
|
||||
SPELL_ATTR5_UNK30 = 0x40000000, // 30
|
||||
SPELL_ATTR5_UNK31 = 0x80000000 // 31 Forces all nearby enemies to focus attacks caster
|
||||
};
|
||||
|
||||
SMART_ENUM((SpellAttr6, uint32),
|
||||
(
|
||||
(SPELL_ATTR6_DONT_DISPLAY_COOLDOWN, 0x00000001, ("0 client doesn't display cooldown in tooltip for these spells")),
|
||||
(SPELL_ATTR6_ONLY_IN_ARENA, 0x00000002, ("1 only usable in arena")),
|
||||
(SPELL_ATTR6_IGNORE_CASTER_AURAS, 0x00000004, ("2")),
|
||||
(SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG, 0x00000008, ("3 skips checking UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC flags on assist")),
|
||||
(SPELL_ATTR6_UNK4, 0x00000010, ("4")),
|
||||
(SPELL_ATTR6_DONT_CONSUME_PROC_CHARGES, 0x00000020, ("5 dont consume proc charges")),
|
||||
(SPELL_ATTR6_USE_SPELL_CAST_EVENT, 0x00000040, ("6 Auras with this attribute trigger SPELL_CAST combat log event instead of SPELL_AURA_START (clientside attribute)")),
|
||||
(SPELL_ATTR6_UNK7, 0x00000080, ("7")),
|
||||
(SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED, 0x00000100, ("8")),
|
||||
(SPELL_ATTR6_UNK9, 0x00000200, ("9")),
|
||||
(SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS, 0x00000400, ("10 NYI!")),
|
||||
(SPELL_ATTR6_NOT_IN_RAID_INSTANCE, 0x00000800, ("11 not usable in raid instance")),
|
||||
(SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE, 0x00001000, ("12 castable while caster is on vehicle")),
|
||||
(SPELL_ATTR6_CAN_TARGET_INVISIBLE, 0x00002000, ("13 ignore visibility requirement for spell target (phases, invisibility, etc.)")),
|
||||
(SPELL_ATTR6_UNK14, 0x00004000, ("14")),
|
||||
(SPELL_ATTR6_UNK15, 0x00008000, ("15 only 54368, 67892")),
|
||||
(SPELL_ATTR6_UNK16, 0x00010000, ("16")),
|
||||
(SPELL_ATTR6_UNK17, 0x00020000, ("17 Mount spell")),
|
||||
(SPELL_ATTR6_CAST_BY_CHARMER, 0x00040000, ("18 client won't allow to cast these spells when unit is not possessed && charmer of caster will be original caster")),
|
||||
(SPELL_ATTR6_UNK19, 0x00080000, ("19 only 47488, 50782")),
|
||||
(SPELL_ATTR6_ONLY_VISIBLE_TO_CASTER, 0x00100000, ("20 Auras with this attribute are only visible to their caster (or pet's owner)")),
|
||||
(SPELL_ATTR6_CLIENT_UI_TARGET_EFFECTS, 0x00200000, ("21 it's only client-side attribute")),
|
||||
(SPELL_ATTR6_UNK22, 0x00400000, ("22 only 72054")),
|
||||
(SPELL_ATTR6_UNK23, 0x00800000, ("23")),
|
||||
(SPELL_ATTR6_CAN_TARGET_UNTARGETABLE, 0x01000000, ("24")),
|
||||
(SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT, 0x02000000, ("25 Exorcism, Flash of Light")),
|
||||
(SPELL_ATTR6_UNK26, 0x04000000, ("26 related to player castable positive buff")),
|
||||
(SPELL_ATTR6_LIMIT_PCT_HEALING_MODS, 0x08000000, ("27 some custom rules - complicated")),
|
||||
(SPELL_ATTR6_UNK28, 0x10000000, ("28 Death Grip")),
|
||||
(SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS, 0x20000000, ("29 ignores done percent damage mods? some custom rules - complicated")),
|
||||
(SPELL_ATTR6_UNK30, 0x40000000, ("30")),
|
||||
(SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS, 0x80000000, ("31 Spells with this attribute skip applying modifiers to category cooldowns"))
|
||||
));
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellAttr6
|
||||
{
|
||||
SPELL_ATTR6_DONT_DISPLAY_COOLDOWN = 0x00000001, // 0 client doesn't display cooldown in tooltip for these spells
|
||||
SPELL_ATTR6_ONLY_IN_ARENA = 0x00000002, // 1 only usable in arena
|
||||
SPELL_ATTR6_IGNORE_CASTER_AURAS = 0x00000004, // 2
|
||||
SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG = 0x00000008, // 3 skips checking UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC flags on assist
|
||||
SPELL_ATTR6_UNK4 = 0x00000010, // 4
|
||||
SPELL_ATTR6_DONT_CONSUME_PROC_CHARGES = 0x00000020, // 5 dont consume proc charges
|
||||
SPELL_ATTR6_USE_SPELL_CAST_EVENT = 0x00000040, // 6 Auras with this attribute trigger SPELL_CAST combat log event instead of SPELL_AURA_START (clientside attribute)
|
||||
SPELL_ATTR6_UNK7 = 0x00000080, // 7
|
||||
SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED = 0x00000100, // 8
|
||||
SPELL_ATTR6_UNK9 = 0x00000200, // 9
|
||||
SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS = 0x00000400, // 10 NYI!
|
||||
SPELL_ATTR6_NOT_IN_RAID_INSTANCE = 0x00000800, // 11 not usable in raid instance
|
||||
SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE = 0x00001000, // 12 castable while caster is on vehicle
|
||||
SPELL_ATTR6_CAN_TARGET_INVISIBLE = 0x00002000, // 13 ignore visibility requirement for spell target (phases, invisibility, etc.)
|
||||
SPELL_ATTR6_UNK14 = 0x00004000, // 14
|
||||
SPELL_ATTR6_UNK15 = 0x00008000, // 15 only 54368, 67892
|
||||
SPELL_ATTR6_UNK16 = 0x00010000, // 16
|
||||
SPELL_ATTR6_UNK17 = 0x00020000, // 17 Mount spell
|
||||
SPELL_ATTR6_CAST_BY_CHARMER = 0x00040000, // 18 client won't allow to cast these spells when unit is not possessed && charmer of caster will be original caster
|
||||
SPELL_ATTR6_UNK19 = 0x00080000, // 19 only 47488, 50782
|
||||
SPELL_ATTR6_ONLY_VISIBLE_TO_CASTER = 0x00100000, // 20 Auras with this attribute are only visible to their caster (or pet's owner)
|
||||
SPELL_ATTR6_CLIENT_UI_TARGET_EFFECTS = 0x00200000, // 21 it's only client-side attribute
|
||||
SPELL_ATTR6_UNK22 = 0x00400000, // 22 only 72054
|
||||
SPELL_ATTR6_UNK23 = 0x00800000, // 23
|
||||
SPELL_ATTR6_CAN_TARGET_UNTARGETABLE = 0x01000000, // 24
|
||||
SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT = 0x02000000, // 25 Exorcism, Flash of Light
|
||||
SPELL_ATTR6_UNK26 = 0x04000000, // 26 related to player castable positive buff
|
||||
SPELL_ATTR6_LIMIT_PCT_HEALING_MODS = 0x08000000, // 27 some custom rules - complicated
|
||||
SPELL_ATTR6_UNK28 = 0x10000000, // 28 Death Grip
|
||||
SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS = 0x20000000, // 29 ignores done percent damage mods? some custom rules - complicated
|
||||
SPELL_ATTR6_UNK30 = 0x40000000, // 30
|
||||
SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS = 0x80000000 // 31 Spells with this attribute skip applying modifiers to category cooldowns
|
||||
};
|
||||
|
||||
SMART_ENUM((SpellAttr7, uint32),
|
||||
(
|
||||
(SPELL_ATTR7_UNK0, 0x00000001, ("0 Shaman's new spells (Call of the ...), Feign Death.")),
|
||||
(SPELL_ATTR7_IGNORE_DURATION_MODS, 0x00000002, ("1 Duration is not affected by duration modifiers")),
|
||||
(SPELL_ATTR7_REACTIVATE_AT_RESURRECT, 0x00000004, ("2 Paladin's auras and 65607 only.")),
|
||||
(SPELL_ATTR7_IS_CHEAT_SPELL, 0x00000008, ("3 Cannot cast if caster doesn't have UnitFlag2 & UNIT_FLAG2_ALLOW_CHEAT_SPELLS")),
|
||||
(SPELL_ATTR7_UNK4, 0x00000010, ("4 Only 47883 (Soulstone Resurrection) and test spell.")),
|
||||
(SPELL_ATTR7_SUMMON_PLAYER_TOTEM, 0x00000020, ("5 Only Shaman player totems.")),
|
||||
(SPELL_ATTR7_NO_PUSHBACK_ON_DAMAGE, 0x00000040, ("6 Does not cause spell pushback on damage")),
|
||||
(SPELL_ATTR7_UNK7, 0x00000080, ("7 66218 (Launch) spell.")),
|
||||
(SPELL_ATTR7_HORDE_ONLY, 0x00000100, ("8 Teleports, mounts and other spells.")),
|
||||
(SPELL_ATTR7_ALLIANCE_ONLY, 0x00000200, ("9 Teleports, mounts and other spells.")),
|
||||
(SPELL_ATTR7_DISPEL_CHARGES, 0x00000400, ("10 Dispel and Spellsteal individual charges instead of whole aura.")),
|
||||
(SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER, 0x00000800, ("11 Only non-player casts interrupt, though Feral Charge - Bear has it.")),
|
||||
(SPELL_ATTR7_UNK12, 0x00001000, ("12 Not set in 3.2.2a.")),
|
||||
(SPELL_ATTR7_UNK13, 0x00002000, ("13 Not set in 3.2.2a.")),
|
||||
(SPELL_ATTR7_UNK14, 0x00004000, ("14 Only 52150 (Raise Dead - Pet) spell.")),
|
||||
(SPELL_ATTR7_UNK15, 0x00008000, ("15 Exorcism. Usable on players? 100% crit chance on undead and demons?")),
|
||||
(SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER, 0x00010000, ("16 These spells can replenish a powertype, which is not the current powertype.")),
|
||||
(SPELL_ATTR7_UNK17, 0x00020000, ("17 Only 27965 (Suicide) spell.")),
|
||||
(SPELL_ATTR7_HAS_CHARGE_EFFECT, 0x00040000, ("18 Only spells that have Charge among effects.")),
|
||||
(SPELL_ATTR7_ZONE_TELEPORT, 0x00080000, ("19 Teleports to specific zones.")),
|
||||
(SPELL_ATTR7_UNK20, 0x00100000, ("20 Blink, Divine Shield, Ice Block")),
|
||||
(SPELL_ATTR7_UNK21, 0x00200000, ("21 Not set")),
|
||||
(SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING, 0x00400000, ("22 Loaned Gryphon, Loaned Wind Rider")),
|
||||
(SPELL_ATTR7_UNK23, 0x00800000, ("23 Motivate, Mutilate, Shattering Throw")),
|
||||
(SPELL_ATTR7_UNK24, 0x01000000, ("24 Motivate, Mutilate, Perform Speech, Shattering Throw")),
|
||||
(SPELL_ATTR7_UNK25, 0x02000000, ("25")),
|
||||
(SPELL_ATTR7_UNK26, 0x04000000, ("26")),
|
||||
(SPELL_ATTR7_UNK27, 0x08000000, ("27 Not set")),
|
||||
(SPELL_ATTR7_CONSOLIDATED_RAID_BUFF, 0x10000000, ("28 May be collapsed in raid buff frame (clientside attribute)")),
|
||||
(SPELL_ATTR7_UNK29, 0x20000000, ("29 only 69028, 71237")),
|
||||
(SPELL_ATTR7_UNK30, 0x40000000, ("30 Burning Determination, Divine Sacrifice, Earth Shield, Prayer of Mending")),
|
||||
(SPELL_ATTR7_CLIENT_INDICATOR, 0x80000000, (""))
|
||||
));
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellAttr7
|
||||
{
|
||||
SPELL_ATTR7_UNK0 = 0x00000001, // 0 Shaman's new spells (Call of the ...), Feign Death.
|
||||
SPELL_ATTR7_IGNORE_DURATION_MODS = 0x00000002, // 1 Duration is not affected by duration modifiers
|
||||
SPELL_ATTR7_REACTIVATE_AT_RESURRECT = 0x00000004, // 2 Paladin's auras and 65607 only.
|
||||
SPELL_ATTR7_IS_CHEAT_SPELL = 0x00000008, // 3 Cannot cast if caster doesn't have UnitFlag2 & UNIT_FLAG2_ALLOW_CHEAT_SPELLS
|
||||
SPELL_ATTR7_UNK4 = 0x00000010, // 4 Only 47883 (Soulstone Resurrection) and test spell.
|
||||
SPELL_ATTR7_SUMMON_PLAYER_TOTEM = 0x00000020, // 5 Only Shaman player totems.
|
||||
SPELL_ATTR7_NO_PUSHBACK_ON_DAMAGE = 0x00000040, // 6 Does not cause spell pushback on damage
|
||||
SPELL_ATTR7_UNK7 = 0x00000080, // 7 66218 (Launch) spell.
|
||||
SPELL_ATTR7_HORDE_ONLY = 0x00000100, // 8 Teleports, mounts and other spells.
|
||||
SPELL_ATTR7_ALLIANCE_ONLY = 0x00000200, // 9 Teleports, mounts and other spells.
|
||||
SPELL_ATTR7_DISPEL_CHARGES = 0x00000400, // 10 Dispel and Spellsteal individual charges instead of whole aura.
|
||||
SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER = 0x00000800, // 11 Only non-player casts interrupt, though Feral Charge - Bear has it.
|
||||
SPELL_ATTR7_UNK12 = 0x00001000, // 12 Not set in 3.2.2a.
|
||||
SPELL_ATTR7_UNK13 = 0x00002000, // 13 Not set in 3.2.2a.
|
||||
SPELL_ATTR7_UNK14 = 0x00004000, // 14 Only 52150 (Raise Dead - Pet) spell.
|
||||
SPELL_ATTR7_UNK15 = 0x00008000, // 15 Exorcism. Usable on players? 100% crit chance on undead and demons?
|
||||
SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER = 0x00010000, // 16 These spells can replenish a powertype, which is not the current powertype.
|
||||
SPELL_ATTR7_UNK17 = 0x00020000, // 17 Only 27965 (Suicide) spell.
|
||||
SPELL_ATTR7_HAS_CHARGE_EFFECT = 0x00040000, // 18 Only spells that have Charge among effects.
|
||||
SPELL_ATTR7_ZONE_TELEPORT = 0x00080000, // 19 Teleports to specific zones.
|
||||
SPELL_ATTR7_UNK20 = 0x00100000, // 20 Blink, Divine Shield, Ice Block
|
||||
SPELL_ATTR7_UNK21 = 0x00200000, // 21 Not set
|
||||
SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING = 0x00400000, // 22 Loaned Gryphon, Loaned Wind Rider
|
||||
SPELL_ATTR7_UNK23 = 0x00800000, // 23 Motivate, Mutilate, Shattering Throw
|
||||
SPELL_ATTR7_UNK24 = 0x01000000, // 24 Motivate, Mutilate, Perform Speech, Shattering Throw
|
||||
SPELL_ATTR7_UNK25 = 0x02000000, // 25
|
||||
SPELL_ATTR7_UNK26 = 0x04000000, // 26
|
||||
SPELL_ATTR7_UNK27 = 0x08000000, // 27 Not set
|
||||
SPELL_ATTR7_CONSOLIDATED_RAID_BUFF = 0x10000000, // 28 May be collapsed in raid buff frame (clientside attribute)
|
||||
SPELL_ATTR7_UNK29 = 0x20000000, // 29 only 69028, 71237
|
||||
SPELL_ATTR7_UNK30 = 0x40000000, // 30 Burning Determination, Divine Sacrifice, Earth Shield, Prayer of Mending
|
||||
SPELL_ATTR7_CLIENT_INDICATOR = 0x80000000
|
||||
};
|
||||
|
||||
#define MIN_TALENT_SPEC 0
|
||||
#define MAX_TALENT_SPEC 1
|
||||
@@ -1312,6 +1319,7 @@ enum AuraStateType
|
||||
(1<<(AURA_STATE_CONFLAGRATE-1))|(1<<(AURA_STATE_DEADLY_POISON-1)))
|
||||
|
||||
// Spell mechanics
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum Mechanics : uint32
|
||||
{
|
||||
MECHANIC_NONE = 0,
|
||||
@@ -1346,7 +1354,7 @@ enum Mechanics : uint32
|
||||
MECHANIC_IMMUNE_SHIELD = 29, // Divine (Blessing) Shield/Protection and Ice Block
|
||||
MECHANIC_SAPPED = 30,
|
||||
MECHANIC_ENRAGED = 31,
|
||||
MAX_MECHANIC = 32
|
||||
MAX_MECHANIC = 32 // SKIP
|
||||
};
|
||||
|
||||
// Used for spell 42292 Immune Movement Impairment and Loss of Control (0x49967ca6)
|
||||
@@ -1532,20 +1540,21 @@ enum SpellHitType
|
||||
SPELL_HIT_TYPE_ATTACK_TABLE_DEBUG = 0x20
|
||||
};
|
||||
|
||||
SMART_ENUM(SpellDmgClass,
|
||||
(
|
||||
(SPELL_DAMAGE_CLASS_NONE, 0, ("None")),
|
||||
(SPELL_DAMAGE_CLASS_MAGIC, 1, ("Magic")),
|
||||
(SPELL_DAMAGE_CLASS_MELEE, 2, ("Melee")),
|
||||
(SPELL_DAMAGE_CLASS_RANGED, 3, ("Ranged"))
|
||||
));
|
||||
SMART_ENUM_BOUND(SpellDmgClass, MAX_SPELL_DAMAGE_CLASS);
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellDmgClass
|
||||
{
|
||||
SPELL_DAMAGE_CLASS_NONE = 0, // TITLE None
|
||||
SPELL_DAMAGE_CLASS_MAGIC = 1, // TITLE Magic
|
||||
SPELL_DAMAGE_CLASS_MELEE = 2, // TITLE Melee
|
||||
SPELL_DAMAGE_CLASS_RANGED = 3 // TITLE Ranged
|
||||
};
|
||||
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellPreventionType
|
||||
{
|
||||
SPELL_PREVENTION_TYPE_NONE = 0,
|
||||
SPELL_PREVENTION_TYPE_SILENCE = 1,
|
||||
SPELL_PREVENTION_TYPE_PACIFY = 2
|
||||
SPELL_PREVENTION_TYPE_NONE = 0, // TITLE None
|
||||
SPELL_PREVENTION_TYPE_SILENCE = 1, // TITLE Silence
|
||||
SPELL_PREVENTION_TYPE_PACIFY = 2 // TITLE Pacify
|
||||
};
|
||||
|
||||
enum GameobjectTypes
|
||||
@@ -2832,7 +2841,7 @@ enum QuestSort
|
||||
QUEST_SORT_LOVE_IS_IN_THE_AIR = 376
|
||||
};
|
||||
|
||||
inline uint8 ClassByQuestSort(int32 QuestSort)
|
||||
constexpr uint8 ClassByQuestSort(int32 QuestSort)
|
||||
{
|
||||
switch (QuestSort)
|
||||
{
|
||||
@@ -3008,7 +3017,7 @@ enum SkillType
|
||||
|
||||
#define MAX_SKILL_TYPE 789
|
||||
|
||||
inline SkillType SkillByLockType(LockType locktype)
|
||||
constexpr SkillType SkillByLockType(LockType locktype)
|
||||
{
|
||||
switch (locktype)
|
||||
{
|
||||
@@ -3022,7 +3031,7 @@ inline SkillType SkillByLockType(LockType locktype)
|
||||
return SKILL_NONE;
|
||||
}
|
||||
|
||||
inline uint32 SkillByQuestSort(int32 QuestSort)
|
||||
constexpr uint32 SkillByQuestSort(int32 QuestSort)
|
||||
{
|
||||
switch (QuestSort)
|
||||
{
|
||||
@@ -3500,28 +3509,28 @@ enum MailResponseResult
|
||||
MAIL_ERR_ITEM_HAS_EXPIRED = 21
|
||||
};
|
||||
|
||||
SMART_ENUM(SpellFamilyNames,
|
||||
(
|
||||
(SPELLFAMILY_GENERIC, 0, ("Generic")),
|
||||
(SPELLFAMILY_UNK1, 1, ("Unk1", "Unk1 (Events, Holidays...)")),
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum SpellFamilyNames
|
||||
{
|
||||
SPELLFAMILY_GENERIC = 0, // TITLE Generic
|
||||
SPELLFAMILY_UNK1 = 1, // TITLE Unk1 (events, holidays, ...)
|
||||
// 2 - unused
|
||||
(SPELLFAMILY_MAGE, 3, ("Mage")),
|
||||
(SPELLFAMILY_WARRIOR, 4, ("Warrior")),
|
||||
(SPELLFAMILY_WARLOCK, 5, ("Warlock")),
|
||||
(SPELLFAMILY_PRIEST, 6, ("Priest")),
|
||||
(SPELLFAMILY_DRUID, 7, ("Druid")),
|
||||
(SPELLFAMILY_ROGUE, 8, ("Rogue")),
|
||||
(SPELLFAMILY_HUNTER, 9, ("Hunter")),
|
||||
(SPELLFAMILY_PALADIN, 10, ("Paladin")),
|
||||
(SPELLFAMILY_SHAMAN, 11, ("Shaman")),
|
||||
(SPELLFAMILY_UNK2, 12, ("Unk2", "Unk2 (Silence resistance?)")),
|
||||
(SPELLFAMILY_POTION, 13, ("Potion")),
|
||||
SPELLFAMILY_MAGE = 3, // TITLE Mage
|
||||
SPELLFAMILY_WARRIOR = 4, // TITLE Warrior
|
||||
SPELLFAMILY_WARLOCK = 5, // TITLE Warlock
|
||||
SPELLFAMILY_PRIEST = 6, // TITLE Priest
|
||||
SPELLFAMILY_DRUID = 7, // TITLE Druid
|
||||
SPELLFAMILY_ROGUE = 8, // TITLE Rogue
|
||||
SPELLFAMILY_HUNTER = 9, // TITLE Hunter
|
||||
SPELLFAMILY_PALADIN = 10, // TITLE Paladin
|
||||
SPELLFAMILY_SHAMAN = 11, // TITLE Shaman
|
||||
SPELLFAMILY_UNK2 = 12, // TITLE Unk2 (Silence resistance?)
|
||||
SPELLFAMILY_POTION = 13, // TITLE Potion
|
||||
// 14 - unused
|
||||
(SPELLFAMILY_DEATHKNIGHT, 15, ("Death Knight")),
|
||||
SPELLFAMILY_DEATHKNIGHT = 15, // TITLE Death Knight
|
||||
// 16 - unused
|
||||
(SPELLFAMILY_PET, 17, ("Pet"))
|
||||
));
|
||||
SMART_ENUM_BOUND(SpellFamilyNames, MAX_SPELL_FAMILY);
|
||||
SPELLFAMILY_PET = 17 // TITLE Pet
|
||||
};
|
||||
|
||||
enum TradeStatus
|
||||
{
|
||||
|
||||
980
src/server/shared/enuminfo_SharedDefines.cpp
Normal file
980
src/server/shared/enuminfo_SharedDefines.cpp
Normal file
@@ -0,0 +1,980 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "SharedDefines.h"
|
||||
#include "Define.h"
|
||||
#include "SmartEnum.h"
|
||||
#include <stdexcept>
|
||||
|
||||
/**************************************************************\
|
||||
|* data for enum 'Powers' in 'SharedDefines.h' auto-generated *|
|
||||
\**************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<Powers>::ToString(Powers value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case POWER_HEALTH: return {"POWER_HEALTH", "Health", ""};
|
||||
case POWER_MANA: return {"POWER_MANA", "Mana", ""};
|
||||
case POWER_RAGE: return {"POWER_RAGE", "Rage", ""};
|
||||
case POWER_FOCUS: return {"POWER_FOCUS", "Focus", ""};
|
||||
case POWER_ENERGY: return {"POWER_ENERGY", "Energy", ""};
|
||||
case POWER_HAPPINESS: return {"POWER_HAPPINESS", "Happiness", ""};
|
||||
case POWER_RUNE: return {"POWER_RUNE", "Runes", ""};
|
||||
case POWER_RUNIC_POWER: return {"POWER_RUNIC_POWER", "Runic Power", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<Powers>::Count() { return 8; }
|
||||
template <>
|
||||
TC_API_EXPORT Powers Trinity::Impl::EnumUtils<Powers>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return POWER_HEALTH;
|
||||
case 1: return POWER_MANA;
|
||||
case 2: return POWER_RAGE;
|
||||
case 3: return POWER_FOCUS;
|
||||
case 4: return POWER_ENERGY;
|
||||
case 5: return POWER_HAPPINESS;
|
||||
case 6: return POWER_RUNE;
|
||||
case 7: return POWER_RUNIC_POWER;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
|* data for enum 'SpellSchools' in 'SharedDefines.h' auto-generated *|
|
||||
\********************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellSchools>::ToString(SpellSchools value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_SCHOOL_NORMAL: return {"SPELL_SCHOOL_NORMAL", "Physical", ""};
|
||||
case SPELL_SCHOOL_HOLY: return {"SPELL_SCHOOL_HOLY", "Holy", ""};
|
||||
case SPELL_SCHOOL_FIRE: return {"SPELL_SCHOOL_FIRE", "Fire", ""};
|
||||
case SPELL_SCHOOL_NATURE: return {"SPELL_SCHOOL_NATURE", "Nature", ""};
|
||||
case SPELL_SCHOOL_FROST: return {"SPELL_SCHOOL_FROST", "Frost", ""};
|
||||
case SPELL_SCHOOL_SHADOW: return {"SPELL_SCHOOL_SHADOW", "Shadow", ""};
|
||||
case SPELL_SCHOOL_ARCANE: return {"SPELL_SCHOOL_ARCANE", "Arcane", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellSchools>::Count() { return 7; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellSchools Trinity::Impl::EnumUtils<SpellSchools>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_SCHOOL_NORMAL;
|
||||
case 1: return SPELL_SCHOOL_HOLY;
|
||||
case 2: return SPELL_SCHOOL_FIRE;
|
||||
case 3: return SPELL_SCHOOL_NATURE;
|
||||
case 4: return SPELL_SCHOOL_FROST;
|
||||
case 5: return SPELL_SCHOOL_SHADOW;
|
||||
case 6: return SPELL_SCHOOL_ARCANE;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************\
|
||||
|* data for enum 'SpellAttr0' in 'SharedDefines.h' auto-generated *|
|
||||
\******************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellAttr0>::ToString(SpellAttr0 value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_ATTR0_UNK0: return {"SPELL_ATTR0_UNK0", "SPELL_ATTR0_UNK0", "0"};
|
||||
case SPELL_ATTR0_REQ_AMMO: return {"SPELL_ATTR0_REQ_AMMO", "SPELL_ATTR0_REQ_AMMO", "1 on next ranged"};
|
||||
case SPELL_ATTR0_ON_NEXT_SWING: return {"SPELL_ATTR0_ON_NEXT_SWING", "SPELL_ATTR0_ON_NEXT_SWING", "2"};
|
||||
case SPELL_ATTR0_IS_REPLENISHMENT: return {"SPELL_ATTR0_IS_REPLENISHMENT", "SPELL_ATTR0_IS_REPLENISHMENT", "3 not set in 3.0.3"};
|
||||
case SPELL_ATTR0_ABILITY: return {"SPELL_ATTR0_ABILITY", "SPELL_ATTR0_ABILITY", "4 client puts 'ability' instead of 'spell' in game strings for these spells"};
|
||||
case SPELL_ATTR0_TRADESPELL: return {"SPELL_ATTR0_TRADESPELL", "SPELL_ATTR0_TRADESPELL", "5 trade spells (recipes), will be added by client to a sublist of profession spell"};
|
||||
case SPELL_ATTR0_PASSIVE: return {"SPELL_ATTR0_PASSIVE", "SPELL_ATTR0_PASSIVE", "6 Passive spell"};
|
||||
case SPELL_ATTR0_HIDDEN_CLIENTSIDE: return {"SPELL_ATTR0_HIDDEN_CLIENTSIDE", "SPELL_ATTR0_HIDDEN_CLIENTSIDE", "7 Spells with this attribute are not visible in spellbook or aura bar"};
|
||||
case SPELL_ATTR0_HIDE_IN_COMBAT_LOG: return {"SPELL_ATTR0_HIDE_IN_COMBAT_LOG", "SPELL_ATTR0_HIDE_IN_COMBAT_LOG", "8 This attribite controls whether spell appears in combat logs"};
|
||||
case SPELL_ATTR0_TARGET_MAINHAND_ITEM: return {"SPELL_ATTR0_TARGET_MAINHAND_ITEM", "SPELL_ATTR0_TARGET_MAINHAND_ITEM", "9 Client automatically selects item from mainhand slot as a cast target"};
|
||||
case SPELL_ATTR0_ON_NEXT_SWING_2: return {"SPELL_ATTR0_ON_NEXT_SWING_2", "SPELL_ATTR0_ON_NEXT_SWING_2", "10"};
|
||||
case SPELL_ATTR0_UNK11: return {"SPELL_ATTR0_UNK11", "SPELL_ATTR0_UNK11", "11"};
|
||||
case SPELL_ATTR0_DAYTIME_ONLY: return {"SPELL_ATTR0_DAYTIME_ONLY", "SPELL_ATTR0_DAYTIME_ONLY", "12 only useable at daytime, not set in 2.4.2"};
|
||||
case SPELL_ATTR0_NIGHT_ONLY: return {"SPELL_ATTR0_NIGHT_ONLY", "SPELL_ATTR0_NIGHT_ONLY", "13 only useable at night, not set in 2.4.2"};
|
||||
case SPELL_ATTR0_INDOORS_ONLY: return {"SPELL_ATTR0_INDOORS_ONLY", "SPELL_ATTR0_INDOORS_ONLY", "14 only useable indoors, not set in 2.4.2"};
|
||||
case SPELL_ATTR0_OUTDOORS_ONLY: return {"SPELL_ATTR0_OUTDOORS_ONLY", "SPELL_ATTR0_OUTDOORS_ONLY", "15 Only useable outdoors."};
|
||||
case SPELL_ATTR0_NOT_SHAPESHIFT: return {"SPELL_ATTR0_NOT_SHAPESHIFT", "SPELL_ATTR0_NOT_SHAPESHIFT", "16 Not while shapeshifted"};
|
||||
case SPELL_ATTR0_ONLY_STEALTHED: return {"SPELL_ATTR0_ONLY_STEALTHED", "SPELL_ATTR0_ONLY_STEALTHED", "17 Must be in stealth"};
|
||||
case SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE: return {"SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE", "SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE", "18 client won't hide unit weapons in sheath on cast/channel"};
|
||||
case SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION: return {"SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION", "SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION", "19 spelldamage depends on caster level"};
|
||||
case SPELL_ATTR0_STOP_ATTACK_TARGET: return {"SPELL_ATTR0_STOP_ATTACK_TARGET", "SPELL_ATTR0_STOP_ATTACK_TARGET", "20 Stop attack after use this spell (and not begin attack if use)"};
|
||||
case SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK: return {"SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK", "SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK", "21 Cannot be dodged/parried/blocked"};
|
||||
case SPELL_ATTR0_CAST_TRACK_TARGET: return {"SPELL_ATTR0_CAST_TRACK_TARGET", "SPELL_ATTR0_CAST_TRACK_TARGET", "22 Client automatically forces player to face target when casting"};
|
||||
case SPELL_ATTR0_CASTABLE_WHILE_DEAD: return {"SPELL_ATTR0_CASTABLE_WHILE_DEAD", "SPELL_ATTR0_CASTABLE_WHILE_DEAD", "23 castable while dead?"};
|
||||
case SPELL_ATTR0_CASTABLE_WHILE_MOUNTED: return {"SPELL_ATTR0_CASTABLE_WHILE_MOUNTED", "SPELL_ATTR0_CASTABLE_WHILE_MOUNTED", "24 castable while mounted"};
|
||||
case SPELL_ATTR0_DISABLED_WHILE_ACTIVE: return {"SPELL_ATTR0_DISABLED_WHILE_ACTIVE", "SPELL_ATTR0_DISABLED_WHILE_ACTIVE", "25 Activate and start cooldown after aura fade or remove summoned creature or go"};
|
||||
case SPELL_ATTR0_NEGATIVE_1: return {"SPELL_ATTR0_NEGATIVE_1", "SPELL_ATTR0_NEGATIVE_1", "26 Many negative spells have this attr"};
|
||||
case SPELL_ATTR0_CASTABLE_WHILE_SITTING: return {"SPELL_ATTR0_CASTABLE_WHILE_SITTING", "SPELL_ATTR0_CASTABLE_WHILE_SITTING", "27 castable while sitting"};
|
||||
case SPELL_ATTR0_CANT_USED_IN_COMBAT: return {"SPELL_ATTR0_CANT_USED_IN_COMBAT", "SPELL_ATTR0_CANT_USED_IN_COMBAT", "28 Cannot be used in combat"};
|
||||
case SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY: return {"SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY", "SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY", "29 unaffected by invulnerability (hmm possible not...)"};
|
||||
case SPELL_ATTR0_HEARTBEAT_RESIST_CHECK: return {"SPELL_ATTR0_HEARTBEAT_RESIST_CHECK", "SPELL_ATTR0_HEARTBEAT_RESIST_CHECK", "30 random chance the effect will end TODO: implement core support"};
|
||||
case SPELL_ATTR0_CANT_CANCEL: return {"SPELL_ATTR0_CANT_CANCEL", "SPELL_ATTR0_CANT_CANCEL", "31 positive aura can't be canceled"};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellAttr0>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellAttr0 Trinity::Impl::EnumUtils<SpellAttr0>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_ATTR0_UNK0;
|
||||
case 1: return SPELL_ATTR0_REQ_AMMO;
|
||||
case 2: return SPELL_ATTR0_ON_NEXT_SWING;
|
||||
case 3: return SPELL_ATTR0_IS_REPLENISHMENT;
|
||||
case 4: return SPELL_ATTR0_ABILITY;
|
||||
case 5: return SPELL_ATTR0_TRADESPELL;
|
||||
case 6: return SPELL_ATTR0_PASSIVE;
|
||||
case 7: return SPELL_ATTR0_HIDDEN_CLIENTSIDE;
|
||||
case 8: return SPELL_ATTR0_HIDE_IN_COMBAT_LOG;
|
||||
case 9: return SPELL_ATTR0_TARGET_MAINHAND_ITEM;
|
||||
case 10: return SPELL_ATTR0_ON_NEXT_SWING_2;
|
||||
case 11: return SPELL_ATTR0_UNK11;
|
||||
case 12: return SPELL_ATTR0_DAYTIME_ONLY;
|
||||
case 13: return SPELL_ATTR0_NIGHT_ONLY;
|
||||
case 14: return SPELL_ATTR0_INDOORS_ONLY;
|
||||
case 15: return SPELL_ATTR0_OUTDOORS_ONLY;
|
||||
case 16: return SPELL_ATTR0_NOT_SHAPESHIFT;
|
||||
case 17: return SPELL_ATTR0_ONLY_STEALTHED;
|
||||
case 18: return SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE;
|
||||
case 19: return SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION;
|
||||
case 20: return SPELL_ATTR0_STOP_ATTACK_TARGET;
|
||||
case 21: return SPELL_ATTR0_IMPOSSIBLE_DODGE_PARRY_BLOCK;
|
||||
case 22: return SPELL_ATTR0_CAST_TRACK_TARGET;
|
||||
case 23: return SPELL_ATTR0_CASTABLE_WHILE_DEAD;
|
||||
case 24: return SPELL_ATTR0_CASTABLE_WHILE_MOUNTED;
|
||||
case 25: return SPELL_ATTR0_DISABLED_WHILE_ACTIVE;
|
||||
case 26: return SPELL_ATTR0_NEGATIVE_1;
|
||||
case 27: return SPELL_ATTR0_CASTABLE_WHILE_SITTING;
|
||||
case 28: return SPELL_ATTR0_CANT_USED_IN_COMBAT;
|
||||
case 29: return SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY;
|
||||
case 30: return SPELL_ATTR0_HEARTBEAT_RESIST_CHECK;
|
||||
case 31: return SPELL_ATTR0_CANT_CANCEL;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************\
|
||||
|* data for enum 'SpellAttr1' in 'SharedDefines.h' auto-generated *|
|
||||
\******************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellAttr1>::ToString(SpellAttr1 value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_ATTR1_DISMISS_PET: return {"SPELL_ATTR1_DISMISS_PET", "SPELL_ATTR1_DISMISS_PET", "0 for spells without this flag client doesn't allow to summon pet if caster has a pet"};
|
||||
case SPELL_ATTR1_DRAIN_ALL_POWER: return {"SPELL_ATTR1_DRAIN_ALL_POWER", "SPELL_ATTR1_DRAIN_ALL_POWER", "1 use all power (Only paladin Lay of Hands and Bunyanize)"};
|
||||
case SPELL_ATTR1_CHANNELED_1: return {"SPELL_ATTR1_CHANNELED_1", "SPELL_ATTR1_CHANNELED_1", "2 clientside checked? cancelable?"};
|
||||
case SPELL_ATTR1_CANT_BE_REDIRECTED: return {"SPELL_ATTR1_CANT_BE_REDIRECTED", "SPELL_ATTR1_CANT_BE_REDIRECTED", "3"};
|
||||
case SPELL_ATTR1_UNK4: return {"SPELL_ATTR1_UNK4", "SPELL_ATTR1_UNK4", "4 stealth and whirlwind"};
|
||||
case SPELL_ATTR1_NOT_BREAK_STEALTH: return {"SPELL_ATTR1_NOT_BREAK_STEALTH", "SPELL_ATTR1_NOT_BREAK_STEALTH", "5 Not break stealth"};
|
||||
case SPELL_ATTR1_CHANNELED_2: return {"SPELL_ATTR1_CHANNELED_2", "SPELL_ATTR1_CHANNELED_2", "6"};
|
||||
case SPELL_ATTR1_CANT_BE_REFLECTED: return {"SPELL_ATTR1_CANT_BE_REFLECTED", "SPELL_ATTR1_CANT_BE_REFLECTED", "7"};
|
||||
case SPELL_ATTR1_CANT_TARGET_IN_COMBAT: return {"SPELL_ATTR1_CANT_TARGET_IN_COMBAT", "SPELL_ATTR1_CANT_TARGET_IN_COMBAT", "8 can target only out of combat units"};
|
||||
case SPELL_ATTR1_MELEE_COMBAT_START: return {"SPELL_ATTR1_MELEE_COMBAT_START", "SPELL_ATTR1_MELEE_COMBAT_START", "9 player starts melee combat after this spell is cast"};
|
||||
case SPELL_ATTR1_NO_THREAT: return {"SPELL_ATTR1_NO_THREAT", "SPELL_ATTR1_NO_THREAT", "10 no generates threat on cast 100% (old NO_INITIAL_AGGRO)"};
|
||||
case SPELL_ATTR1_UNK11: return {"SPELL_ATTR1_UNK11", "SPELL_ATTR1_UNK11", "11 aura"};
|
||||
case SPELL_ATTR1_IS_PICKPOCKET: return {"SPELL_ATTR1_IS_PICKPOCKET", "SPELL_ATTR1_IS_PICKPOCKET", "12 Pickpocket"};
|
||||
case SPELL_ATTR1_FARSIGHT: return {"SPELL_ATTR1_FARSIGHT", "SPELL_ATTR1_FARSIGHT", "13 Client removes farsight on aura loss"};
|
||||
case SPELL_ATTR1_CHANNEL_TRACK_TARGET: return {"SPELL_ATTR1_CHANNEL_TRACK_TARGET", "SPELL_ATTR1_CHANNEL_TRACK_TARGET", "14 Client automatically forces player to face target when channeling"};
|
||||
case SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY: return {"SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY", "SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY", "15 remove auras on immunity"};
|
||||
case SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE: return {"SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE", "SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE", "16 on immuniy"};
|
||||
case SPELL_ATTR1_UNAUTOCASTABLE_BY_PET: return {"SPELL_ATTR1_UNAUTOCASTABLE_BY_PET", "SPELL_ATTR1_UNAUTOCASTABLE_BY_PET", "17"};
|
||||
case SPELL_ATTR1_UNK18: return {"SPELL_ATTR1_UNK18", "SPELL_ATTR1_UNK18", "18 stun, polymorph, daze, hex"};
|
||||
case SPELL_ATTR1_CANT_TARGET_SELF: return {"SPELL_ATTR1_CANT_TARGET_SELF", "SPELL_ATTR1_CANT_TARGET_SELF", "19"};
|
||||
case SPELL_ATTR1_REQ_COMBO_POINTS1: return {"SPELL_ATTR1_REQ_COMBO_POINTS1", "SPELL_ATTR1_REQ_COMBO_POINTS1", "20 Req combo points on target"};
|
||||
case SPELL_ATTR1_UNK21: return {"SPELL_ATTR1_UNK21", "SPELL_ATTR1_UNK21", "21"};
|
||||
case SPELL_ATTR1_REQ_COMBO_POINTS2: return {"SPELL_ATTR1_REQ_COMBO_POINTS2", "SPELL_ATTR1_REQ_COMBO_POINTS2", "22 Req combo points on target"};
|
||||
case SPELL_ATTR1_UNK23: return {"SPELL_ATTR1_UNK23", "SPELL_ATTR1_UNK23", "23"};
|
||||
case SPELL_ATTR1_IS_FISHING: return {"SPELL_ATTR1_IS_FISHING", "SPELL_ATTR1_IS_FISHING", "24 only fishing spells"};
|
||||
case SPELL_ATTR1_UNK25: return {"SPELL_ATTR1_UNK25", "SPELL_ATTR1_UNK25", "25"};
|
||||
case SPELL_ATTR1_UNK26: return {"SPELL_ATTR1_UNK26", "SPELL_ATTR1_UNK26", "26 works correctly with [target=focus] and [target=mouseover] macros?"};
|
||||
case SPELL_ATTR1_UNK27: return {"SPELL_ATTR1_UNK27", "SPELL_ATTR1_UNK27", "27 melee spell?"};
|
||||
case SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR: return {"SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR", "SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR", "28 client doesn't display these spells in aura bar"};
|
||||
case SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME: return {"SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME", "SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME", "29 spell name is displayed in cast bar instead of 'channeling' text"};
|
||||
case SPELL_ATTR1_ENABLE_AT_DODGE: return {"SPELL_ATTR1_ENABLE_AT_DODGE", "SPELL_ATTR1_ENABLE_AT_DODGE", "30 Overpower"};
|
||||
case SPELL_ATTR1_UNK31: return {"SPELL_ATTR1_UNK31", "SPELL_ATTR1_UNK31", "31"};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellAttr1>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellAttr1 Trinity::Impl::EnumUtils<SpellAttr1>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_ATTR1_DISMISS_PET;
|
||||
case 1: return SPELL_ATTR1_DRAIN_ALL_POWER;
|
||||
case 2: return SPELL_ATTR1_CHANNELED_1;
|
||||
case 3: return SPELL_ATTR1_CANT_BE_REDIRECTED;
|
||||
case 4: return SPELL_ATTR1_UNK4;
|
||||
case 5: return SPELL_ATTR1_NOT_BREAK_STEALTH;
|
||||
case 6: return SPELL_ATTR1_CHANNELED_2;
|
||||
case 7: return SPELL_ATTR1_CANT_BE_REFLECTED;
|
||||
case 8: return SPELL_ATTR1_CANT_TARGET_IN_COMBAT;
|
||||
case 9: return SPELL_ATTR1_MELEE_COMBAT_START;
|
||||
case 10: return SPELL_ATTR1_NO_THREAT;
|
||||
case 11: return SPELL_ATTR1_UNK11;
|
||||
case 12: return SPELL_ATTR1_IS_PICKPOCKET;
|
||||
case 13: return SPELL_ATTR1_FARSIGHT;
|
||||
case 14: return SPELL_ATTR1_CHANNEL_TRACK_TARGET;
|
||||
case 15: return SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY;
|
||||
case 16: return SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE;
|
||||
case 17: return SPELL_ATTR1_UNAUTOCASTABLE_BY_PET;
|
||||
case 18: return SPELL_ATTR1_UNK18;
|
||||
case 19: return SPELL_ATTR1_CANT_TARGET_SELF;
|
||||
case 20: return SPELL_ATTR1_REQ_COMBO_POINTS1;
|
||||
case 21: return SPELL_ATTR1_UNK21;
|
||||
case 22: return SPELL_ATTR1_REQ_COMBO_POINTS2;
|
||||
case 23: return SPELL_ATTR1_UNK23;
|
||||
case 24: return SPELL_ATTR1_IS_FISHING;
|
||||
case 25: return SPELL_ATTR1_UNK25;
|
||||
case 26: return SPELL_ATTR1_UNK26;
|
||||
case 27: return SPELL_ATTR1_UNK27;
|
||||
case 28: return SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR;
|
||||
case 29: return SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME;
|
||||
case 30: return SPELL_ATTR1_ENABLE_AT_DODGE;
|
||||
case 31: return SPELL_ATTR1_UNK31;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************\
|
||||
|* data for enum 'SpellAttr2' in 'SharedDefines.h' auto-generated *|
|
||||
\******************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellAttr2>::ToString(SpellAttr2 value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_ATTR2_CAN_TARGET_DEAD: return {"SPELL_ATTR2_CAN_TARGET_DEAD", "SPELL_ATTR2_CAN_TARGET_DEAD", "0 can target dead unit or corpse"};
|
||||
case SPELL_ATTR2_UNK1: return {"SPELL_ATTR2_UNK1", "SPELL_ATTR2_UNK1", "1 vanish, shadowform, Ghost Wolf and other"};
|
||||
case SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS: return {"SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS", "SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS", "2 26368 4.0.1 dbc change"};
|
||||
case SPELL_ATTR2_UNK3: return {"SPELL_ATTR2_UNK3", "SPELL_ATTR2_UNK3", "3"};
|
||||
case SPELL_ATTR2_DISPLAY_IN_STANCE_BAR: return {"SPELL_ATTR2_DISPLAY_IN_STANCE_BAR", "SPELL_ATTR2_DISPLAY_IN_STANCE_BAR", "4 client displays icon in stance bar when learned, even if not shapeshift"};
|
||||
case SPELL_ATTR2_AUTOREPEAT_FLAG: return {"SPELL_ATTR2_AUTOREPEAT_FLAG", "SPELL_ATTR2_AUTOREPEAT_FLAG", "5"};
|
||||
case SPELL_ATTR2_CANT_TARGET_TAPPED: return {"SPELL_ATTR2_CANT_TARGET_TAPPED", "SPELL_ATTR2_CANT_TARGET_TAPPED", "6 target must be tapped by caster"};
|
||||
case SPELL_ATTR2_UNK7: return {"SPELL_ATTR2_UNK7", "SPELL_ATTR2_UNK7", "7"};
|
||||
case SPELL_ATTR2_UNK8: return {"SPELL_ATTR2_UNK8", "SPELL_ATTR2_UNK8", "8 not set in 3.0.3"};
|
||||
case SPELL_ATTR2_UNK9: return {"SPELL_ATTR2_UNK9", "SPELL_ATTR2_UNK9", "9"};
|
||||
case SPELL_ATTR2_UNK10: return {"SPELL_ATTR2_UNK10", "SPELL_ATTR2_UNK10", "10 related to tame"};
|
||||
case SPELL_ATTR2_HEALTH_FUNNEL: return {"SPELL_ATTR2_HEALTH_FUNNEL", "SPELL_ATTR2_HEALTH_FUNNEL", "11"};
|
||||
case SPELL_ATTR2_UNK12: return {"SPELL_ATTR2_UNK12", "SPELL_ATTR2_UNK12", "12 Cleave, Heart Strike, Maul, Sunder Armor, Swipe"};
|
||||
case SPELL_ATTR2_PRESERVE_ENCHANT_IN_ARENA: return {"SPELL_ATTR2_PRESERVE_ENCHANT_IN_ARENA", "SPELL_ATTR2_PRESERVE_ENCHANT_IN_ARENA", "13 Items enchanted by spells with this flag preserve the enchant to arenas"};
|
||||
case SPELL_ATTR2_UNK14: return {"SPELL_ATTR2_UNK14", "SPELL_ATTR2_UNK14", "14"};
|
||||
case SPELL_ATTR2_UNK15: return {"SPELL_ATTR2_UNK15", "SPELL_ATTR2_UNK15", "15 not set in 3.0.3"};
|
||||
case SPELL_ATTR2_TAME_BEAST: return {"SPELL_ATTR2_TAME_BEAST", "SPELL_ATTR2_TAME_BEAST", "16"};
|
||||
case SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS: return {"SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS", "SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS", "17 don't reset timers for melee autoattacks (swings) or ranged autoattacks (autoshoots)"};
|
||||
case SPELL_ATTR2_REQ_DEAD_PET: return {"SPELL_ATTR2_REQ_DEAD_PET", "SPELL_ATTR2_REQ_DEAD_PET", "18 Only Revive pet and Heart of the Pheonix"};
|
||||
case SPELL_ATTR2_NOT_NEED_SHAPESHIFT: return {"SPELL_ATTR2_NOT_NEED_SHAPESHIFT", "SPELL_ATTR2_NOT_NEED_SHAPESHIFT", "19 does not necessarly need shapeshift"};
|
||||
case SPELL_ATTR2_UNK20: return {"SPELL_ATTR2_UNK20", "SPELL_ATTR2_UNK20", "20"};
|
||||
case SPELL_ATTR2_DAMAGE_REDUCED_SHIELD: return {"SPELL_ATTR2_DAMAGE_REDUCED_SHIELD", "SPELL_ATTR2_DAMAGE_REDUCED_SHIELD", "21 for ice blocks, pala immunity buffs, priest absorb shields, but used also for other spells -> not sure!"};
|
||||
case SPELL_ATTR2_UNK22: return {"SPELL_ATTR2_UNK22", "SPELL_ATTR2_UNK22", "22 Ambush, Backstab, Cheap Shot, Death Grip, Garrote, Judgements, Mutilate, Pounce, Ravage, Shiv, Shred"};
|
||||
case SPELL_ATTR2_IS_ARCANE_CONCENTRATION: return {"SPELL_ATTR2_IS_ARCANE_CONCENTRATION", "SPELL_ATTR2_IS_ARCANE_CONCENTRATION", "23 Only mage Arcane Concentration have this flag"};
|
||||
case SPELL_ATTR2_UNK24: return {"SPELL_ATTR2_UNK24", "SPELL_ATTR2_UNK24", "24"};
|
||||
case SPELL_ATTR2_UNK25: return {"SPELL_ATTR2_UNK25", "SPELL_ATTR2_UNK25", "25"};
|
||||
case SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE: return {"SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE", "SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE", "26 unaffected by school immunity"};
|
||||
case SPELL_ATTR2_UNK27: return {"SPELL_ATTR2_UNK27", "SPELL_ATTR2_UNK27", "27"};
|
||||
case SPELL_ATTR2_UNK28: return {"SPELL_ATTR2_UNK28", "SPELL_ATTR2_UNK28", "28"};
|
||||
case SPELL_ATTR2_CANT_CRIT: return {"SPELL_ATTR2_CANT_CRIT", "SPELL_ATTR2_CANT_CRIT", "29 Spell can't crit"};
|
||||
case SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC: return {"SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC", "SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC", "30 spell can trigger even if triggered"};
|
||||
case SPELL_ATTR2_FOOD_BUFF: return {"SPELL_ATTR2_FOOD_BUFF", "SPELL_ATTR2_FOOD_BUFF", "31 Food or Drink Buff (like Well Fed)"};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellAttr2>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellAttr2 Trinity::Impl::EnumUtils<SpellAttr2>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_ATTR2_CAN_TARGET_DEAD;
|
||||
case 1: return SPELL_ATTR2_UNK1;
|
||||
case 2: return SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS;
|
||||
case 3: return SPELL_ATTR2_UNK3;
|
||||
case 4: return SPELL_ATTR2_DISPLAY_IN_STANCE_BAR;
|
||||
case 5: return SPELL_ATTR2_AUTOREPEAT_FLAG;
|
||||
case 6: return SPELL_ATTR2_CANT_TARGET_TAPPED;
|
||||
case 7: return SPELL_ATTR2_UNK7;
|
||||
case 8: return SPELL_ATTR2_UNK8;
|
||||
case 9: return SPELL_ATTR2_UNK9;
|
||||
case 10: return SPELL_ATTR2_UNK10;
|
||||
case 11: return SPELL_ATTR2_HEALTH_FUNNEL;
|
||||
case 12: return SPELL_ATTR2_UNK12;
|
||||
case 13: return SPELL_ATTR2_PRESERVE_ENCHANT_IN_ARENA;
|
||||
case 14: return SPELL_ATTR2_UNK14;
|
||||
case 15: return SPELL_ATTR2_UNK15;
|
||||
case 16: return SPELL_ATTR2_TAME_BEAST;
|
||||
case 17: return SPELL_ATTR2_NOT_RESET_AUTO_ACTIONS;
|
||||
case 18: return SPELL_ATTR2_REQ_DEAD_PET;
|
||||
case 19: return SPELL_ATTR2_NOT_NEED_SHAPESHIFT;
|
||||
case 20: return SPELL_ATTR2_UNK20;
|
||||
case 21: return SPELL_ATTR2_DAMAGE_REDUCED_SHIELD;
|
||||
case 22: return SPELL_ATTR2_UNK22;
|
||||
case 23: return SPELL_ATTR2_IS_ARCANE_CONCENTRATION;
|
||||
case 24: return SPELL_ATTR2_UNK24;
|
||||
case 25: return SPELL_ATTR2_UNK25;
|
||||
case 26: return SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE;
|
||||
case 27: return SPELL_ATTR2_UNK27;
|
||||
case 28: return SPELL_ATTR2_UNK28;
|
||||
case 29: return SPELL_ATTR2_CANT_CRIT;
|
||||
case 30: return SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC;
|
||||
case 31: return SPELL_ATTR2_FOOD_BUFF;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************\
|
||||
|* data for enum 'SpellAttr3' in 'SharedDefines.h' auto-generated *|
|
||||
\******************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellAttr3>::ToString(SpellAttr3 value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_ATTR3_UNK0: return {"SPELL_ATTR3_UNK0", "SPELL_ATTR3_UNK0", "0"};
|
||||
case SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK: return {"SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK", "SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK", "1 Ignores subclass mask check when checking proc"};
|
||||
case SPELL_ATTR3_UNK2: return {"SPELL_ATTR3_UNK2", "SPELL_ATTR3_UNK2", "2"};
|
||||
case SPELL_ATTR3_BLOCKABLE_SPELL: return {"SPELL_ATTR3_BLOCKABLE_SPELL", "SPELL_ATTR3_BLOCKABLE_SPELL", "3 Only dmg class melee in 3.1.3"};
|
||||
case SPELL_ATTR3_IGNORE_RESURRECTION_TIMER: return {"SPELL_ATTR3_IGNORE_RESURRECTION_TIMER", "SPELL_ATTR3_IGNORE_RESURRECTION_TIMER", "4 you don't have to wait to be resurrected with these spells"};
|
||||
case SPELL_ATTR3_UNK5: return {"SPELL_ATTR3_UNK5", "SPELL_ATTR3_UNK5", "5"};
|
||||
case SPELL_ATTR3_UNK6: return {"SPELL_ATTR3_UNK6", "SPELL_ATTR3_UNK6", "6"};
|
||||
case SPELL_ATTR3_STACK_FOR_DIFF_CASTERS: return {"SPELL_ATTR3_STACK_FOR_DIFF_CASTERS", "SPELL_ATTR3_STACK_FOR_DIFF_CASTERS", "7 separate stack for every caster"};
|
||||
case SPELL_ATTR3_ONLY_TARGET_PLAYERS: return {"SPELL_ATTR3_ONLY_TARGET_PLAYERS", "SPELL_ATTR3_ONLY_TARGET_PLAYERS", "8 can only target players"};
|
||||
case SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2: return {"SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2", "SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2", "9 triggered from effect?"};
|
||||
case SPELL_ATTR3_MAIN_HAND: return {"SPELL_ATTR3_MAIN_HAND", "SPELL_ATTR3_MAIN_HAND", "10 Main hand weapon required"};
|
||||
case SPELL_ATTR3_BATTLEGROUND: return {"SPELL_ATTR3_BATTLEGROUND", "SPELL_ATTR3_BATTLEGROUND", "11 Can only be cast in battleground"};
|
||||
case SPELL_ATTR3_ONLY_TARGET_GHOSTS: return {"SPELL_ATTR3_ONLY_TARGET_GHOSTS", "SPELL_ATTR3_ONLY_TARGET_GHOSTS", "12"};
|
||||
case SPELL_ATTR3_DONT_DISPLAY_CHANNEL_BAR: return {"SPELL_ATTR3_DONT_DISPLAY_CHANNEL_BAR", "SPELL_ATTR3_DONT_DISPLAY_CHANNEL_BAR", "13 Clientside attribute - will not display channeling bar"};
|
||||
case SPELL_ATTR3_IS_HONORLESS_TARGET: return {"SPELL_ATTR3_IS_HONORLESS_TARGET", "SPELL_ATTR3_IS_HONORLESS_TARGET", "14 \042Honorless Target\042 only this spells have this flag"};
|
||||
case SPELL_ATTR3_UNK15: return {"SPELL_ATTR3_UNK15", "SPELL_ATTR3_UNK15", "15 Auto Shoot, Shoot, Throw, - this is autoshot flag"};
|
||||
case SPELL_ATTR3_CANT_TRIGGER_PROC: return {"SPELL_ATTR3_CANT_TRIGGER_PROC", "SPELL_ATTR3_CANT_TRIGGER_PROC", "16 confirmed with many patchnotes"};
|
||||
case SPELL_ATTR3_NO_INITIAL_AGGRO: return {"SPELL_ATTR3_NO_INITIAL_AGGRO", "SPELL_ATTR3_NO_INITIAL_AGGRO", "17 Soothe Animal, 39758, Mind Soothe"};
|
||||
case SPELL_ATTR3_IGNORE_HIT_RESULT: return {"SPELL_ATTR3_IGNORE_HIT_RESULT", "SPELL_ATTR3_IGNORE_HIT_RESULT", "18 Spell should always hit its target"};
|
||||
case SPELL_ATTR3_DISABLE_PROC: return {"SPELL_ATTR3_DISABLE_PROC", "SPELL_ATTR3_DISABLE_PROC", "19 during aura proc no spells can trigger (20178, 20375)"};
|
||||
case SPELL_ATTR3_DEATH_PERSISTENT: return {"SPELL_ATTR3_DEATH_PERSISTENT", "SPELL_ATTR3_DEATH_PERSISTENT", "20 Death persistent spells"};
|
||||
case SPELL_ATTR3_UNK21: return {"SPELL_ATTR3_UNK21", "SPELL_ATTR3_UNK21", "21 unused"};
|
||||
case SPELL_ATTR3_REQ_WAND: return {"SPELL_ATTR3_REQ_WAND", "SPELL_ATTR3_REQ_WAND", "22 Req wand"};
|
||||
case SPELL_ATTR3_UNK23: return {"SPELL_ATTR3_UNK23", "SPELL_ATTR3_UNK23", "23"};
|
||||
case SPELL_ATTR3_REQ_OFFHAND: return {"SPELL_ATTR3_REQ_OFFHAND", "SPELL_ATTR3_REQ_OFFHAND", "24 Req offhand weapon"};
|
||||
case SPELL_ATTR3_TREAT_AS_PERIODIC: return {"SPELL_ATTR3_TREAT_AS_PERIODIC", "SPELL_ATTR3_TREAT_AS_PERIODIC", "25 Makes the spell appear as periodic in client combat logs - used by spells that trigger another spell on each tick"};
|
||||
case SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED: return {"SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED", "SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED", "26 auras with this attribute can proc from triggered spell casts with SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2 (67736 + 52999)"};
|
||||
case SPELL_ATTR3_DRAIN_SOUL: return {"SPELL_ATTR3_DRAIN_SOUL", "SPELL_ATTR3_DRAIN_SOUL", "27 only drain soul has this flag"};
|
||||
case SPELL_ATTR3_UNK28: return {"SPELL_ATTR3_UNK28", "SPELL_ATTR3_UNK28", "28"};
|
||||
case SPELL_ATTR3_NO_DONE_BONUS: return {"SPELL_ATTR3_NO_DONE_BONUS", "SPELL_ATTR3_NO_DONE_BONUS", "29 Ignore caster spellpower and done damage mods? client doesn't apply spellmods for those spells"};
|
||||
case SPELL_ATTR3_DONT_DISPLAY_RANGE: return {"SPELL_ATTR3_DONT_DISPLAY_RANGE", "SPELL_ATTR3_DONT_DISPLAY_RANGE", "30 client doesn't display range in tooltip for those spells"};
|
||||
case SPELL_ATTR3_UNK31: return {"SPELL_ATTR3_UNK31", "SPELL_ATTR3_UNK31", "31"};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellAttr3>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellAttr3 Trinity::Impl::EnumUtils<SpellAttr3>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_ATTR3_UNK0;
|
||||
case 1: return SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK;
|
||||
case 2: return SPELL_ATTR3_UNK2;
|
||||
case 3: return SPELL_ATTR3_BLOCKABLE_SPELL;
|
||||
case 4: return SPELL_ATTR3_IGNORE_RESURRECTION_TIMER;
|
||||
case 5: return SPELL_ATTR3_UNK5;
|
||||
case 6: return SPELL_ATTR3_UNK6;
|
||||
case 7: return SPELL_ATTR3_STACK_FOR_DIFF_CASTERS;
|
||||
case 8: return SPELL_ATTR3_ONLY_TARGET_PLAYERS;
|
||||
case 9: return SPELL_ATTR3_TRIGGERED_CAN_TRIGGER_PROC_2;
|
||||
case 10: return SPELL_ATTR3_MAIN_HAND;
|
||||
case 11: return SPELL_ATTR3_BATTLEGROUND;
|
||||
case 12: return SPELL_ATTR3_ONLY_TARGET_GHOSTS;
|
||||
case 13: return SPELL_ATTR3_DONT_DISPLAY_CHANNEL_BAR;
|
||||
case 14: return SPELL_ATTR3_IS_HONORLESS_TARGET;
|
||||
case 15: return SPELL_ATTR3_UNK15;
|
||||
case 16: return SPELL_ATTR3_CANT_TRIGGER_PROC;
|
||||
case 17: return SPELL_ATTR3_NO_INITIAL_AGGRO;
|
||||
case 18: return SPELL_ATTR3_IGNORE_HIT_RESULT;
|
||||
case 19: return SPELL_ATTR3_DISABLE_PROC;
|
||||
case 20: return SPELL_ATTR3_DEATH_PERSISTENT;
|
||||
case 21: return SPELL_ATTR3_UNK21;
|
||||
case 22: return SPELL_ATTR3_REQ_WAND;
|
||||
case 23: return SPELL_ATTR3_UNK23;
|
||||
case 24: return SPELL_ATTR3_REQ_OFFHAND;
|
||||
case 25: return SPELL_ATTR3_TREAT_AS_PERIODIC;
|
||||
case 26: return SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED;
|
||||
case 27: return SPELL_ATTR3_DRAIN_SOUL;
|
||||
case 28: return SPELL_ATTR3_UNK28;
|
||||
case 29: return SPELL_ATTR3_NO_DONE_BONUS;
|
||||
case 30: return SPELL_ATTR3_DONT_DISPLAY_RANGE;
|
||||
case 31: return SPELL_ATTR3_UNK31;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************\
|
||||
|* data for enum 'SpellAttr4' in 'SharedDefines.h' auto-generated *|
|
||||
\******************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellAttr4>::ToString(SpellAttr4 value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_ATTR4_IGNORE_RESISTANCES: return {"SPELL_ATTR4_IGNORE_RESISTANCES", "SPELL_ATTR4_IGNORE_RESISTANCES", "0 spells with this attribute will completely ignore the target's resistance (these spells can't be resisted)"};
|
||||
case SPELL_ATTR4_PROC_ONLY_ON_CASTER: return {"SPELL_ATTR4_PROC_ONLY_ON_CASTER", "SPELL_ATTR4_PROC_ONLY_ON_CASTER", "1 proc only on effects with TARGET_UNIT_CASTER?"};
|
||||
case SPELL_ATTR4_FADES_WHILE_LOGGED_OUT: return {"SPELL_ATTR4_FADES_WHILE_LOGGED_OUT", "SPELL_ATTR4_FADES_WHILE_LOGGED_OUT", "2 duration is removed from aura while player is logged out"};
|
||||
case SPELL_ATTR4_UNK3: return {"SPELL_ATTR4_UNK3", "SPELL_ATTR4_UNK3", "3"};
|
||||
case SPELL_ATTR4_UNK4: return {"SPELL_ATTR4_UNK4", "SPELL_ATTR4_UNK4", "4 This will no longer cause guards to attack on use??"};
|
||||
case SPELL_ATTR4_UNK5: return {"SPELL_ATTR4_UNK5", "SPELL_ATTR4_UNK5", "5"};
|
||||
case SPELL_ATTR4_NOT_STEALABLE: return {"SPELL_ATTR4_NOT_STEALABLE", "SPELL_ATTR4_NOT_STEALABLE", "6 although such auras might be dispellable, they cannot be stolen"};
|
||||
case SPELL_ATTR4_CAN_CAST_WHILE_CASTING: return {"SPELL_ATTR4_CAN_CAST_WHILE_CASTING", "SPELL_ATTR4_CAN_CAST_WHILE_CASTING", "7 Can be cast while another cast is in progress - see CanCastWhileCasting(SpellRec const*,CGUnit_C *,int &)"};
|
||||
case SPELL_ATTR4_FIXED_DAMAGE: return {"SPELL_ATTR4_FIXED_DAMAGE", "SPELL_ATTR4_FIXED_DAMAGE", "8 Ignores resilience and any (except mechanic related) damage or % damage taken auras on target."};
|
||||
case SPELL_ATTR4_TRIGGER_ACTIVATE: return {"SPELL_ATTR4_TRIGGER_ACTIVATE", "SPELL_ATTR4_TRIGGER_ACTIVATE", "9 initially disabled / trigger activate from event (Execute, Riposte, Deep Freeze end other)"};
|
||||
case SPELL_ATTR4_SPELL_VS_EXTEND_COST: return {"SPELL_ATTR4_SPELL_VS_EXTEND_COST", "SPELL_ATTR4_SPELL_VS_EXTEND_COST", "10 Rogue Shiv have this flag"};
|
||||
case SPELL_ATTR4_UNK11: return {"SPELL_ATTR4_UNK11", "SPELL_ATTR4_UNK11", "11"};
|
||||
case SPELL_ATTR4_UNK12: return {"SPELL_ATTR4_UNK12", "SPELL_ATTR4_UNK12", "12"};
|
||||
case SPELL_ATTR4_UNK13: return {"SPELL_ATTR4_UNK13", "SPELL_ATTR4_UNK13", "13"};
|
||||
case SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS: return {"SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS", "SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS", "14 doesn't break auras by damage from these spells"};
|
||||
case SPELL_ATTR4_UNK15: return {"SPELL_ATTR4_UNK15", "SPELL_ATTR4_UNK15", "15"};
|
||||
case SPELL_ATTR4_NOT_USABLE_IN_ARENA: return {"SPELL_ATTR4_NOT_USABLE_IN_ARENA", "SPELL_ATTR4_NOT_USABLE_IN_ARENA", "16"};
|
||||
case SPELL_ATTR4_USABLE_IN_ARENA: return {"SPELL_ATTR4_USABLE_IN_ARENA", "SPELL_ATTR4_USABLE_IN_ARENA", "17"};
|
||||
case SPELL_ATTR4_AREA_TARGET_CHAIN: return {"SPELL_ATTR4_AREA_TARGET_CHAIN", "SPELL_ATTR4_AREA_TARGET_CHAIN", "18 (NYI)hits area targets one after another instead of all at once"};
|
||||
case SPELL_ATTR4_UNK19: return {"SPELL_ATTR4_UNK19", "SPELL_ATTR4_UNK19", "19 proc dalayed, after damage or don't proc on absorb?"};
|
||||
case SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER: return {"SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER", "SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER", "20 supersedes message \042More powerful spell applied\042 for self casts."};
|
||||
case SPELL_ATTR4_UNK21: return {"SPELL_ATTR4_UNK21", "SPELL_ATTR4_UNK21", "21 Pally aura, dk presence, dudu form, warrior stance, shadowform, hunter track"};
|
||||
case SPELL_ATTR4_UNK22: return {"SPELL_ATTR4_UNK22", "SPELL_ATTR4_UNK22", "22 Seal of Command (42058, 57770) and Gymer's Smash 55426"};
|
||||
case SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS: return {"SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS", "SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS", "23 spells with this flag should not trigger item spells / enchants (mostly in conjunction with SPELL_ATTR0_STOP_ATTACK_TARGET)"};
|
||||
case SPELL_ATTR4_UNK24: return {"SPELL_ATTR4_UNK24", "SPELL_ATTR4_UNK24", "24 some shoot spell"};
|
||||
case SPELL_ATTR4_IS_PET_SCALING: return {"SPELL_ATTR4_IS_PET_SCALING", "SPELL_ATTR4_IS_PET_SCALING", "25 pet scaling auras"};
|
||||
case SPELL_ATTR4_CAST_ONLY_IN_OUTLAND: return {"SPELL_ATTR4_CAST_ONLY_IN_OUTLAND", "SPELL_ATTR4_CAST_ONLY_IN_OUTLAND", "26 Can only be used in Outland."};
|
||||
case SPELL_ATTR4_INHERIT_CRIT_FROM_AURA: return {"SPELL_ATTR4_INHERIT_CRIT_FROM_AURA", "SPELL_ATTR4_INHERIT_CRIT_FROM_AURA", "27 Volley, Arcane Missiles, Penance -> related to critical on channeled periodical damage spell"};
|
||||
case SPELL_ATTR4_UNK28: return {"SPELL_ATTR4_UNK28", "SPELL_ATTR4_UNK28", "28 Aimed Shot"};
|
||||
case SPELL_ATTR4_UNK29: return {"SPELL_ATTR4_UNK29", "SPELL_ATTR4_UNK29", "29"};
|
||||
case SPELL_ATTR4_UNK30: return {"SPELL_ATTR4_UNK30", "SPELL_ATTR4_UNK30", "30"};
|
||||
case SPELL_ATTR4_UNK31: return {"SPELL_ATTR4_UNK31", "SPELL_ATTR4_UNK31", "31 Polymorph (chicken) 228 and Sonic Boom (38052, 38488)"};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellAttr4>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellAttr4 Trinity::Impl::EnumUtils<SpellAttr4>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_ATTR4_IGNORE_RESISTANCES;
|
||||
case 1: return SPELL_ATTR4_PROC_ONLY_ON_CASTER;
|
||||
case 2: return SPELL_ATTR4_FADES_WHILE_LOGGED_OUT;
|
||||
case 3: return SPELL_ATTR4_UNK3;
|
||||
case 4: return SPELL_ATTR4_UNK4;
|
||||
case 5: return SPELL_ATTR4_UNK5;
|
||||
case 6: return SPELL_ATTR4_NOT_STEALABLE;
|
||||
case 7: return SPELL_ATTR4_CAN_CAST_WHILE_CASTING;
|
||||
case 8: return SPELL_ATTR4_FIXED_DAMAGE;
|
||||
case 9: return SPELL_ATTR4_TRIGGER_ACTIVATE;
|
||||
case 10: return SPELL_ATTR4_SPELL_VS_EXTEND_COST;
|
||||
case 11: return SPELL_ATTR4_UNK11;
|
||||
case 12: return SPELL_ATTR4_UNK12;
|
||||
case 13: return SPELL_ATTR4_UNK13;
|
||||
case 14: return SPELL_ATTR4_DAMAGE_DOESNT_BREAK_AURAS;
|
||||
case 15: return SPELL_ATTR4_UNK15;
|
||||
case 16: return SPELL_ATTR4_NOT_USABLE_IN_ARENA;
|
||||
case 17: return SPELL_ATTR4_USABLE_IN_ARENA;
|
||||
case 18: return SPELL_ATTR4_AREA_TARGET_CHAIN;
|
||||
case 19: return SPELL_ATTR4_UNK19;
|
||||
case 20: return SPELL_ATTR4_NOT_CHECK_SELFCAST_POWER;
|
||||
case 21: return SPELL_ATTR4_UNK21;
|
||||
case 22: return SPELL_ATTR4_UNK22;
|
||||
case 23: return SPELL_ATTR4_CANT_TRIGGER_ITEM_SPELLS;
|
||||
case 24: return SPELL_ATTR4_UNK24;
|
||||
case 25: return SPELL_ATTR4_IS_PET_SCALING;
|
||||
case 26: return SPELL_ATTR4_CAST_ONLY_IN_OUTLAND;
|
||||
case 27: return SPELL_ATTR4_INHERIT_CRIT_FROM_AURA;
|
||||
case 28: return SPELL_ATTR4_UNK28;
|
||||
case 29: return SPELL_ATTR4_UNK29;
|
||||
case 30: return SPELL_ATTR4_UNK30;
|
||||
case 31: return SPELL_ATTR4_UNK31;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************\
|
||||
|* data for enum 'SpellAttr5' in 'SharedDefines.h' auto-generated *|
|
||||
\******************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellAttr5>::ToString(SpellAttr5 value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING: return {"SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING", "SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING", "0 available casting channel spell when moving"};
|
||||
case SPELL_ATTR5_NO_REAGENT_WHILE_PREP: return {"SPELL_ATTR5_NO_REAGENT_WHILE_PREP", "SPELL_ATTR5_NO_REAGENT_WHILE_PREP", "1 not need reagents if UNIT_FLAG_PREPARATION"};
|
||||
case SPELL_ATTR5_REMOVE_ON_ARENA_ENTER: return {"SPELL_ATTR5_REMOVE_ON_ARENA_ENTER", "SPELL_ATTR5_REMOVE_ON_ARENA_ENTER", "2 remove this aura on arena enter"};
|
||||
case SPELL_ATTR5_USABLE_WHILE_STUNNED: return {"SPELL_ATTR5_USABLE_WHILE_STUNNED", "SPELL_ATTR5_USABLE_WHILE_STUNNED", "3 usable while stunned"};
|
||||
case SPELL_ATTR5_UNK4: return {"SPELL_ATTR5_UNK4", "SPELL_ATTR5_UNK4", "4"};
|
||||
case SPELL_ATTR5_SINGLE_TARGET_SPELL: return {"SPELL_ATTR5_SINGLE_TARGET_SPELL", "SPELL_ATTR5_SINGLE_TARGET_SPELL", "5 Only one target can be apply at a time"};
|
||||
case SPELL_ATTR5_UNK6: return {"SPELL_ATTR5_UNK6", "SPELL_ATTR5_UNK6", "6"};
|
||||
case SPELL_ATTR5_UNK7: return {"SPELL_ATTR5_UNK7", "SPELL_ATTR5_UNK7", "7"};
|
||||
case SPELL_ATTR5_UNK8: return {"SPELL_ATTR5_UNK8", "SPELL_ATTR5_UNK8", "8"};
|
||||
case SPELL_ATTR5_START_PERIODIC_AT_APPLY: return {"SPELL_ATTR5_START_PERIODIC_AT_APPLY", "SPELL_ATTR5_START_PERIODIC_AT_APPLY", "9 begin periodic tick at aura apply"};
|
||||
case SPELL_ATTR5_HIDE_DURATION: return {"SPELL_ATTR5_HIDE_DURATION", "SPELL_ATTR5_HIDE_DURATION", "10 do not send duration to client"};
|
||||
case SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET: return {"SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET", "SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET", "11 (NYI) uses target's target as target if original target not valid (intervene for example)"};
|
||||
case SPELL_ATTR5_UNK12: return {"SPELL_ATTR5_UNK12", "SPELL_ATTR5_UNK12", "12 Cleave related?"};
|
||||
case SPELL_ATTR5_HASTE_AFFECT_DURATION: return {"SPELL_ATTR5_HASTE_AFFECT_DURATION", "SPELL_ATTR5_HASTE_AFFECT_DURATION", "13 haste effects decrease duration of this"};
|
||||
case SPELL_ATTR5_UNK14: return {"SPELL_ATTR5_UNK14", "SPELL_ATTR5_UNK14", "14"};
|
||||
case SPELL_ATTR5_UNK15: return {"SPELL_ATTR5_UNK15", "SPELL_ATTR5_UNK15", "15 Inflits on multiple targets?"};
|
||||
case SPELL_ATTR5_UNK16: return {"SPELL_ATTR5_UNK16", "SPELL_ATTR5_UNK16", "16"};
|
||||
case SPELL_ATTR5_USABLE_WHILE_FEARED: return {"SPELL_ATTR5_USABLE_WHILE_FEARED", "SPELL_ATTR5_USABLE_WHILE_FEARED", "17 usable while feared"};
|
||||
case SPELL_ATTR5_USABLE_WHILE_CONFUSED: return {"SPELL_ATTR5_USABLE_WHILE_CONFUSED", "SPELL_ATTR5_USABLE_WHILE_CONFUSED", "18 usable while confused"};
|
||||
case SPELL_ATTR5_DONT_TURN_DURING_CAST: return {"SPELL_ATTR5_DONT_TURN_DURING_CAST", "SPELL_ATTR5_DONT_TURN_DURING_CAST", "19 Blocks caster's turning when casting (client does not automatically turn caster's model to face UNIT_FIELD_TARGET)"};
|
||||
case SPELL_ATTR5_UNK20: return {"SPELL_ATTR5_UNK20", "SPELL_ATTR5_UNK20", "20"};
|
||||
case SPELL_ATTR5_UNK21: return {"SPELL_ATTR5_UNK21", "SPELL_ATTR5_UNK21", "21"};
|
||||
case SPELL_ATTR5_UNK22: return {"SPELL_ATTR5_UNK22", "SPELL_ATTR5_UNK22", "22"};
|
||||
case SPELL_ATTR5_UNK23: return {"SPELL_ATTR5_UNK23", "SPELL_ATTR5_UNK23", "23"};
|
||||
case SPELL_ATTR5_UNK24: return {"SPELL_ATTR5_UNK24", "SPELL_ATTR5_UNK24", "24"};
|
||||
case SPELL_ATTR5_UNK25: return {"SPELL_ATTR5_UNK25", "SPELL_ATTR5_UNK25", "25"};
|
||||
case SPELL_ATTR5_SKIP_CHECKCAST_LOS_CHECK: return {"SPELL_ATTR5_SKIP_CHECKCAST_LOS_CHECK", "SPELL_ATTR5_SKIP_CHECKCAST_LOS_CHECK", "26 aoe related - Boulder, Cannon, Corpse Explosion, Fire Nova, Flames, Frost Bomb, Living Bomb, Seed of Corruption, Starfall, Thunder Clap, Volley"};
|
||||
case SPELL_ATTR5_DONT_SHOW_AURA_IF_SELF_CAST: return {"SPELL_ATTR5_DONT_SHOW_AURA_IF_SELF_CAST", "SPELL_ATTR5_DONT_SHOW_AURA_IF_SELF_CAST", "27 Auras with this attribute are not visible on units that are the caster"};
|
||||
case SPELL_ATTR5_DONT_SHOW_AURA_IF_NOT_SELF_CAST: return {"SPELL_ATTR5_DONT_SHOW_AURA_IF_NOT_SELF_CAST", "SPELL_ATTR5_DONT_SHOW_AURA_IF_NOT_SELF_CAST", "28 Auras with this attribute are not visible on units that are not the caster"};
|
||||
case SPELL_ATTR5_UNK29: return {"SPELL_ATTR5_UNK29", "SPELL_ATTR5_UNK29", "29"};
|
||||
case SPELL_ATTR5_UNK30: return {"SPELL_ATTR5_UNK30", "SPELL_ATTR5_UNK30", "30"};
|
||||
case SPELL_ATTR5_UNK31: return {"SPELL_ATTR5_UNK31", "SPELL_ATTR5_UNK31", "31 Forces all nearby enemies to focus attacks caster"};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellAttr5>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellAttr5 Trinity::Impl::EnumUtils<SpellAttr5>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING;
|
||||
case 1: return SPELL_ATTR5_NO_REAGENT_WHILE_PREP;
|
||||
case 2: return SPELL_ATTR5_REMOVE_ON_ARENA_ENTER;
|
||||
case 3: return SPELL_ATTR5_USABLE_WHILE_STUNNED;
|
||||
case 4: return SPELL_ATTR5_UNK4;
|
||||
case 5: return SPELL_ATTR5_SINGLE_TARGET_SPELL;
|
||||
case 6: return SPELL_ATTR5_UNK6;
|
||||
case 7: return SPELL_ATTR5_UNK7;
|
||||
case 8: return SPELL_ATTR5_UNK8;
|
||||
case 9: return SPELL_ATTR5_START_PERIODIC_AT_APPLY;
|
||||
case 10: return SPELL_ATTR5_HIDE_DURATION;
|
||||
case 11: return SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET;
|
||||
case 12: return SPELL_ATTR5_UNK12;
|
||||
case 13: return SPELL_ATTR5_HASTE_AFFECT_DURATION;
|
||||
case 14: return SPELL_ATTR5_UNK14;
|
||||
case 15: return SPELL_ATTR5_UNK15;
|
||||
case 16: return SPELL_ATTR5_UNK16;
|
||||
case 17: return SPELL_ATTR5_USABLE_WHILE_FEARED;
|
||||
case 18: return SPELL_ATTR5_USABLE_WHILE_CONFUSED;
|
||||
case 19: return SPELL_ATTR5_DONT_TURN_DURING_CAST;
|
||||
case 20: return SPELL_ATTR5_UNK20;
|
||||
case 21: return SPELL_ATTR5_UNK21;
|
||||
case 22: return SPELL_ATTR5_UNK22;
|
||||
case 23: return SPELL_ATTR5_UNK23;
|
||||
case 24: return SPELL_ATTR5_UNK24;
|
||||
case 25: return SPELL_ATTR5_UNK25;
|
||||
case 26: return SPELL_ATTR5_SKIP_CHECKCAST_LOS_CHECK;
|
||||
case 27: return SPELL_ATTR5_DONT_SHOW_AURA_IF_SELF_CAST;
|
||||
case 28: return SPELL_ATTR5_DONT_SHOW_AURA_IF_NOT_SELF_CAST;
|
||||
case 29: return SPELL_ATTR5_UNK29;
|
||||
case 30: return SPELL_ATTR5_UNK30;
|
||||
case 31: return SPELL_ATTR5_UNK31;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************\
|
||||
|* data for enum 'SpellAttr6' in 'SharedDefines.h' auto-generated *|
|
||||
\******************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellAttr6>::ToString(SpellAttr6 value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_ATTR6_DONT_DISPLAY_COOLDOWN: return {"SPELL_ATTR6_DONT_DISPLAY_COOLDOWN", "SPELL_ATTR6_DONT_DISPLAY_COOLDOWN", "0 client doesn't display cooldown in tooltip for these spells"};
|
||||
case SPELL_ATTR6_ONLY_IN_ARENA: return {"SPELL_ATTR6_ONLY_IN_ARENA", "SPELL_ATTR6_ONLY_IN_ARENA", "1 only usable in arena"};
|
||||
case SPELL_ATTR6_IGNORE_CASTER_AURAS: return {"SPELL_ATTR6_IGNORE_CASTER_AURAS", "SPELL_ATTR6_IGNORE_CASTER_AURAS", "2"};
|
||||
case SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG: return {"SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG", "SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG", "3 skips checking UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC flags on assist"};
|
||||
case SPELL_ATTR6_UNK4: return {"SPELL_ATTR6_UNK4", "SPELL_ATTR6_UNK4", "4"};
|
||||
case SPELL_ATTR6_DONT_CONSUME_PROC_CHARGES: return {"SPELL_ATTR6_DONT_CONSUME_PROC_CHARGES", "SPELL_ATTR6_DONT_CONSUME_PROC_CHARGES", "5 dont consume proc charges"};
|
||||
case SPELL_ATTR6_USE_SPELL_CAST_EVENT: return {"SPELL_ATTR6_USE_SPELL_CAST_EVENT", "SPELL_ATTR6_USE_SPELL_CAST_EVENT", "6 Auras with this attribute trigger SPELL_CAST combat log event instead of SPELL_AURA_START (clientside attribute)"};
|
||||
case SPELL_ATTR6_UNK7: return {"SPELL_ATTR6_UNK7", "SPELL_ATTR6_UNK7", "7"};
|
||||
case SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED: return {"SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED", "SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED", "8"};
|
||||
case SPELL_ATTR6_UNK9: return {"SPELL_ATTR6_UNK9", "SPELL_ATTR6_UNK9", "9"};
|
||||
case SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS: return {"SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS", "SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS", "10 NYI!"};
|
||||
case SPELL_ATTR6_NOT_IN_RAID_INSTANCE: return {"SPELL_ATTR6_NOT_IN_RAID_INSTANCE", "SPELL_ATTR6_NOT_IN_RAID_INSTANCE", "11 not usable in raid instance"};
|
||||
case SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE: return {"SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE", "SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE", "12 castable while caster is on vehicle"};
|
||||
case SPELL_ATTR6_CAN_TARGET_INVISIBLE: return {"SPELL_ATTR6_CAN_TARGET_INVISIBLE", "SPELL_ATTR6_CAN_TARGET_INVISIBLE", "13 ignore visibility requirement for spell target (phases, invisibility, etc.)"};
|
||||
case SPELL_ATTR6_UNK14: return {"SPELL_ATTR6_UNK14", "SPELL_ATTR6_UNK14", "14"};
|
||||
case SPELL_ATTR6_UNK15: return {"SPELL_ATTR6_UNK15", "SPELL_ATTR6_UNK15", "15 only 54368, 67892"};
|
||||
case SPELL_ATTR6_UNK16: return {"SPELL_ATTR6_UNK16", "SPELL_ATTR6_UNK16", "16"};
|
||||
case SPELL_ATTR6_UNK17: return {"SPELL_ATTR6_UNK17", "SPELL_ATTR6_UNK17", "17 Mount spell"};
|
||||
case SPELL_ATTR6_CAST_BY_CHARMER: return {"SPELL_ATTR6_CAST_BY_CHARMER", "SPELL_ATTR6_CAST_BY_CHARMER", "18 client won't allow to cast these spells when unit is not possessed && charmer of caster will be original caster"};
|
||||
case SPELL_ATTR6_UNK19: return {"SPELL_ATTR6_UNK19", "SPELL_ATTR6_UNK19", "19 only 47488, 50782"};
|
||||
case SPELL_ATTR6_ONLY_VISIBLE_TO_CASTER: return {"SPELL_ATTR6_ONLY_VISIBLE_TO_CASTER", "SPELL_ATTR6_ONLY_VISIBLE_TO_CASTER", "20 Auras with this attribute are only visible to their caster (or pet's owner)"};
|
||||
case SPELL_ATTR6_CLIENT_UI_TARGET_EFFECTS: return {"SPELL_ATTR6_CLIENT_UI_TARGET_EFFECTS", "SPELL_ATTR6_CLIENT_UI_TARGET_EFFECTS", "21 it's only client-side attribute"};
|
||||
case SPELL_ATTR6_UNK22: return {"SPELL_ATTR6_UNK22", "SPELL_ATTR6_UNK22", "22 only 72054"};
|
||||
case SPELL_ATTR6_UNK23: return {"SPELL_ATTR6_UNK23", "SPELL_ATTR6_UNK23", "23"};
|
||||
case SPELL_ATTR6_CAN_TARGET_UNTARGETABLE: return {"SPELL_ATTR6_CAN_TARGET_UNTARGETABLE", "SPELL_ATTR6_CAN_TARGET_UNTARGETABLE", "24"};
|
||||
case SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT: return {"SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT", "SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT", "25 Exorcism, Flash of Light"};
|
||||
case SPELL_ATTR6_UNK26: return {"SPELL_ATTR6_UNK26", "SPELL_ATTR6_UNK26", "26 related to player castable positive buff"};
|
||||
case SPELL_ATTR6_LIMIT_PCT_HEALING_MODS: return {"SPELL_ATTR6_LIMIT_PCT_HEALING_MODS", "SPELL_ATTR6_LIMIT_PCT_HEALING_MODS", "27 some custom rules - complicated"};
|
||||
case SPELL_ATTR6_UNK28: return {"SPELL_ATTR6_UNK28", "SPELL_ATTR6_UNK28", "28 Death Grip"};
|
||||
case SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS: return {"SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS", "SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS", "29 ignores done percent damage mods? some custom rules - complicated"};
|
||||
case SPELL_ATTR6_UNK30: return {"SPELL_ATTR6_UNK30", "SPELL_ATTR6_UNK30", "30"};
|
||||
case SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS: return {"SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS", "SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS", "31 Spells with this attribute skip applying modifiers to category cooldowns"};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellAttr6>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellAttr6 Trinity::Impl::EnumUtils<SpellAttr6>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_ATTR6_DONT_DISPLAY_COOLDOWN;
|
||||
case 1: return SPELL_ATTR6_ONLY_IN_ARENA;
|
||||
case 2: return SPELL_ATTR6_IGNORE_CASTER_AURAS;
|
||||
case 3: return SPELL_ATTR6_ASSIST_IGNORE_IMMUNE_FLAG;
|
||||
case 4: return SPELL_ATTR6_UNK4;
|
||||
case 5: return SPELL_ATTR6_DONT_CONSUME_PROC_CHARGES;
|
||||
case 6: return SPELL_ATTR6_USE_SPELL_CAST_EVENT;
|
||||
case 7: return SPELL_ATTR6_UNK7;
|
||||
case 8: return SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED;
|
||||
case 9: return SPELL_ATTR6_UNK9;
|
||||
case 10: return SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS;
|
||||
case 11: return SPELL_ATTR6_NOT_IN_RAID_INSTANCE;
|
||||
case 12: return SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE;
|
||||
case 13: return SPELL_ATTR6_CAN_TARGET_INVISIBLE;
|
||||
case 14: return SPELL_ATTR6_UNK14;
|
||||
case 15: return SPELL_ATTR6_UNK15;
|
||||
case 16: return SPELL_ATTR6_UNK16;
|
||||
case 17: return SPELL_ATTR6_UNK17;
|
||||
case 18: return SPELL_ATTR6_CAST_BY_CHARMER;
|
||||
case 19: return SPELL_ATTR6_UNK19;
|
||||
case 20: return SPELL_ATTR6_ONLY_VISIBLE_TO_CASTER;
|
||||
case 21: return SPELL_ATTR6_CLIENT_UI_TARGET_EFFECTS;
|
||||
case 22: return SPELL_ATTR6_UNK22;
|
||||
case 23: return SPELL_ATTR6_UNK23;
|
||||
case 24: return SPELL_ATTR6_CAN_TARGET_UNTARGETABLE;
|
||||
case 25: return SPELL_ATTR6_NOT_RESET_SWING_IF_INSTANT;
|
||||
case 26: return SPELL_ATTR6_UNK26;
|
||||
case 27: return SPELL_ATTR6_LIMIT_PCT_HEALING_MODS;
|
||||
case 28: return SPELL_ATTR6_UNK28;
|
||||
case 29: return SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS;
|
||||
case 30: return SPELL_ATTR6_UNK30;
|
||||
case 31: return SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************\
|
||||
|* data for enum 'SpellAttr7' in 'SharedDefines.h' auto-generated *|
|
||||
\******************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellAttr7>::ToString(SpellAttr7 value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_ATTR7_UNK0: return {"SPELL_ATTR7_UNK0", "SPELL_ATTR7_UNK0", "0 Shaman's new spells (Call of the ...), Feign Death."};
|
||||
case SPELL_ATTR7_IGNORE_DURATION_MODS: return {"SPELL_ATTR7_IGNORE_DURATION_MODS", "SPELL_ATTR7_IGNORE_DURATION_MODS", "1 Duration is not affected by duration modifiers"};
|
||||
case SPELL_ATTR7_REACTIVATE_AT_RESURRECT: return {"SPELL_ATTR7_REACTIVATE_AT_RESURRECT", "SPELL_ATTR7_REACTIVATE_AT_RESURRECT", "2 Paladin's auras and 65607 only."};
|
||||
case SPELL_ATTR7_IS_CHEAT_SPELL: return {"SPELL_ATTR7_IS_CHEAT_SPELL", "SPELL_ATTR7_IS_CHEAT_SPELL", "3 Cannot cast if caster doesn't have UnitFlag2 & UNIT_FLAG2_ALLOW_CHEAT_SPELLS"};
|
||||
case SPELL_ATTR7_UNK4: return {"SPELL_ATTR7_UNK4", "SPELL_ATTR7_UNK4", "4 Only 47883 (Soulstone Resurrection) and test spell."};
|
||||
case SPELL_ATTR7_SUMMON_PLAYER_TOTEM: return {"SPELL_ATTR7_SUMMON_PLAYER_TOTEM", "SPELL_ATTR7_SUMMON_PLAYER_TOTEM", "5 Only Shaman player totems."};
|
||||
case SPELL_ATTR7_NO_PUSHBACK_ON_DAMAGE: return {"SPELL_ATTR7_NO_PUSHBACK_ON_DAMAGE", "SPELL_ATTR7_NO_PUSHBACK_ON_DAMAGE", "6 Does not cause spell pushback on damage"};
|
||||
case SPELL_ATTR7_UNK7: return {"SPELL_ATTR7_UNK7", "SPELL_ATTR7_UNK7", "7 66218 (Launch) spell."};
|
||||
case SPELL_ATTR7_HORDE_ONLY: return {"SPELL_ATTR7_HORDE_ONLY", "SPELL_ATTR7_HORDE_ONLY", "8 Teleports, mounts and other spells."};
|
||||
case SPELL_ATTR7_ALLIANCE_ONLY: return {"SPELL_ATTR7_ALLIANCE_ONLY", "SPELL_ATTR7_ALLIANCE_ONLY", "9 Teleports, mounts and other spells."};
|
||||
case SPELL_ATTR7_DISPEL_CHARGES: return {"SPELL_ATTR7_DISPEL_CHARGES", "SPELL_ATTR7_DISPEL_CHARGES", "10 Dispel and Spellsteal individual charges instead of whole aura."};
|
||||
case SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER: return {"SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER", "SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER", "11 Only non-player casts interrupt, though Feral Charge - Bear has it."};
|
||||
case SPELL_ATTR7_UNK12: return {"SPELL_ATTR7_UNK12", "SPELL_ATTR7_UNK12", "12 Not set in 3.2.2a."};
|
||||
case SPELL_ATTR7_UNK13: return {"SPELL_ATTR7_UNK13", "SPELL_ATTR7_UNK13", "13 Not set in 3.2.2a."};
|
||||
case SPELL_ATTR7_UNK14: return {"SPELL_ATTR7_UNK14", "SPELL_ATTR7_UNK14", "14 Only 52150 (Raise Dead - Pet) spell."};
|
||||
case SPELL_ATTR7_UNK15: return {"SPELL_ATTR7_UNK15", "SPELL_ATTR7_UNK15", "15 Exorcism. Usable on players? 100% crit chance on undead and demons?"};
|
||||
case SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER: return {"SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER", "SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER", "16 These spells can replenish a powertype, which is not the current powertype."};
|
||||
case SPELL_ATTR7_UNK17: return {"SPELL_ATTR7_UNK17", "SPELL_ATTR7_UNK17", "17 Only 27965 (Suicide) spell."};
|
||||
case SPELL_ATTR7_HAS_CHARGE_EFFECT: return {"SPELL_ATTR7_HAS_CHARGE_EFFECT", "SPELL_ATTR7_HAS_CHARGE_EFFECT", "18 Only spells that have Charge among effects."};
|
||||
case SPELL_ATTR7_ZONE_TELEPORT: return {"SPELL_ATTR7_ZONE_TELEPORT", "SPELL_ATTR7_ZONE_TELEPORT", "19 Teleports to specific zones."};
|
||||
case SPELL_ATTR7_UNK20: return {"SPELL_ATTR7_UNK20", "SPELL_ATTR7_UNK20", "20 Blink, Divine Shield, Ice Block"};
|
||||
case SPELL_ATTR7_UNK21: return {"SPELL_ATTR7_UNK21", "SPELL_ATTR7_UNK21", "21 Not set"};
|
||||
case SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING: return {"SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING", "SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING", "22 Loaned Gryphon, Loaned Wind Rider"};
|
||||
case SPELL_ATTR7_UNK23: return {"SPELL_ATTR7_UNK23", "SPELL_ATTR7_UNK23", "23 Motivate, Mutilate, Shattering Throw"};
|
||||
case SPELL_ATTR7_UNK24: return {"SPELL_ATTR7_UNK24", "SPELL_ATTR7_UNK24", "24 Motivate, Mutilate, Perform Speech, Shattering Throw"};
|
||||
case SPELL_ATTR7_UNK25: return {"SPELL_ATTR7_UNK25", "SPELL_ATTR7_UNK25", "25"};
|
||||
case SPELL_ATTR7_UNK26: return {"SPELL_ATTR7_UNK26", "SPELL_ATTR7_UNK26", "26"};
|
||||
case SPELL_ATTR7_UNK27: return {"SPELL_ATTR7_UNK27", "SPELL_ATTR7_UNK27", "27 Not set"};
|
||||
case SPELL_ATTR7_CONSOLIDATED_RAID_BUFF: return {"SPELL_ATTR7_CONSOLIDATED_RAID_BUFF", "SPELL_ATTR7_CONSOLIDATED_RAID_BUFF", "28 May be collapsed in raid buff frame (clientside attribute)"};
|
||||
case SPELL_ATTR7_UNK29: return {"SPELL_ATTR7_UNK29", "SPELL_ATTR7_UNK29", "29 only 69028, 71237"};
|
||||
case SPELL_ATTR7_UNK30: return {"SPELL_ATTR7_UNK30", "SPELL_ATTR7_UNK30", "30 Burning Determination, Divine Sacrifice, Earth Shield, Prayer of Mending"};
|
||||
case SPELL_ATTR7_CLIENT_INDICATOR: return {"SPELL_ATTR7_CLIENT_INDICATOR", "SPELL_ATTR7_CLIENT_INDICATOR", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellAttr7>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellAttr7 Trinity::Impl::EnumUtils<SpellAttr7>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_ATTR7_UNK0;
|
||||
case 1: return SPELL_ATTR7_IGNORE_DURATION_MODS;
|
||||
case 2: return SPELL_ATTR7_REACTIVATE_AT_RESURRECT;
|
||||
case 3: return SPELL_ATTR7_IS_CHEAT_SPELL;
|
||||
case 4: return SPELL_ATTR7_UNK4;
|
||||
case 5: return SPELL_ATTR7_SUMMON_PLAYER_TOTEM;
|
||||
case 6: return SPELL_ATTR7_NO_PUSHBACK_ON_DAMAGE;
|
||||
case 7: return SPELL_ATTR7_UNK7;
|
||||
case 8: return SPELL_ATTR7_HORDE_ONLY;
|
||||
case 9: return SPELL_ATTR7_ALLIANCE_ONLY;
|
||||
case 10: return SPELL_ATTR7_DISPEL_CHARGES;
|
||||
case 11: return SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER;
|
||||
case 12: return SPELL_ATTR7_UNK12;
|
||||
case 13: return SPELL_ATTR7_UNK13;
|
||||
case 14: return SPELL_ATTR7_UNK14;
|
||||
case 15: return SPELL_ATTR7_UNK15;
|
||||
case 16: return SPELL_ATTR7_CAN_RESTORE_SECONDARY_POWER;
|
||||
case 17: return SPELL_ATTR7_UNK17;
|
||||
case 18: return SPELL_ATTR7_HAS_CHARGE_EFFECT;
|
||||
case 19: return SPELL_ATTR7_ZONE_TELEPORT;
|
||||
case 20: return SPELL_ATTR7_UNK20;
|
||||
case 21: return SPELL_ATTR7_UNK21;
|
||||
case 22: return SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING;
|
||||
case 23: return SPELL_ATTR7_UNK23;
|
||||
case 24: return SPELL_ATTR7_UNK24;
|
||||
case 25: return SPELL_ATTR7_UNK25;
|
||||
case 26: return SPELL_ATTR7_UNK26;
|
||||
case 27: return SPELL_ATTR7_UNK27;
|
||||
case 28: return SPELL_ATTR7_CONSOLIDATED_RAID_BUFF;
|
||||
case 29: return SPELL_ATTR7_UNK29;
|
||||
case 30: return SPELL_ATTR7_UNK30;
|
||||
case 31: return SPELL_ATTR7_CLIENT_INDICATOR;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************\
|
||||
|* data for enum 'Mechanics' in 'SharedDefines.h' auto-generated *|
|
||||
\*****************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<Mechanics>::ToString(Mechanics value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case MECHANIC_NONE: return {"MECHANIC_NONE", "MECHANIC_NONE", ""};
|
||||
case MECHANIC_CHARM: return {"MECHANIC_CHARM", "MECHANIC_CHARM", ""};
|
||||
case MECHANIC_DISORIENTED: return {"MECHANIC_DISORIENTED", "MECHANIC_DISORIENTED", ""};
|
||||
case MECHANIC_DISARM: return {"MECHANIC_DISARM", "MECHANIC_DISARM", ""};
|
||||
case MECHANIC_DISTRACT: return {"MECHANIC_DISTRACT", "MECHANIC_DISTRACT", ""};
|
||||
case MECHANIC_FEAR: return {"MECHANIC_FEAR", "MECHANIC_FEAR", ""};
|
||||
case MECHANIC_GRIP: return {"MECHANIC_GRIP", "MECHANIC_GRIP", ""};
|
||||
case MECHANIC_ROOT: return {"MECHANIC_ROOT", "MECHANIC_ROOT", ""};
|
||||
case MECHANIC_SLOW_ATTACK: return {"MECHANIC_SLOW_ATTACK", "MECHANIC_SLOW_ATTACK", ""};
|
||||
case MECHANIC_SILENCE: return {"MECHANIC_SILENCE", "MECHANIC_SILENCE", ""};
|
||||
case MECHANIC_SLEEP: return {"MECHANIC_SLEEP", "MECHANIC_SLEEP", ""};
|
||||
case MECHANIC_SNARE: return {"MECHANIC_SNARE", "MECHANIC_SNARE", ""};
|
||||
case MECHANIC_STUN: return {"MECHANIC_STUN", "MECHANIC_STUN", ""};
|
||||
case MECHANIC_FREEZE: return {"MECHANIC_FREEZE", "MECHANIC_FREEZE", ""};
|
||||
case MECHANIC_KNOCKOUT: return {"MECHANIC_KNOCKOUT", "MECHANIC_KNOCKOUT", ""};
|
||||
case MECHANIC_BLEED: return {"MECHANIC_BLEED", "MECHANIC_BLEED", ""};
|
||||
case MECHANIC_BANDAGE: return {"MECHANIC_BANDAGE", "MECHANIC_BANDAGE", ""};
|
||||
case MECHANIC_POLYMORPH: return {"MECHANIC_POLYMORPH", "MECHANIC_POLYMORPH", ""};
|
||||
case MECHANIC_BANISH: return {"MECHANIC_BANISH", "MECHANIC_BANISH", ""};
|
||||
case MECHANIC_SHIELD: return {"MECHANIC_SHIELD", "MECHANIC_SHIELD", ""};
|
||||
case MECHANIC_SHACKLE: return {"MECHANIC_SHACKLE", "MECHANIC_SHACKLE", ""};
|
||||
case MECHANIC_MOUNT: return {"MECHANIC_MOUNT", "MECHANIC_MOUNT", ""};
|
||||
case MECHANIC_INFECTED: return {"MECHANIC_INFECTED", "MECHANIC_INFECTED", ""};
|
||||
case MECHANIC_TURN: return {"MECHANIC_TURN", "MECHANIC_TURN", ""};
|
||||
case MECHANIC_HORROR: return {"MECHANIC_HORROR", "MECHANIC_HORROR", ""};
|
||||
case MECHANIC_INVULNERABILITY: return {"MECHANIC_INVULNERABILITY", "MECHANIC_INVULNERABILITY", ""};
|
||||
case MECHANIC_INTERRUPT: return {"MECHANIC_INTERRUPT", "MECHANIC_INTERRUPT", ""};
|
||||
case MECHANIC_DAZE: return {"MECHANIC_DAZE", "MECHANIC_DAZE", ""};
|
||||
case MECHANIC_DISCOVERY: return {"MECHANIC_DISCOVERY", "MECHANIC_DISCOVERY", ""};
|
||||
case MECHANIC_IMMUNE_SHIELD: return {"MECHANIC_IMMUNE_SHIELD", "MECHANIC_IMMUNE_SHIELD", "Divine (Blessing) Shield/Protection and Ice Block"};
|
||||
case MECHANIC_SAPPED: return {"MECHANIC_SAPPED", "MECHANIC_SAPPED", ""};
|
||||
case MECHANIC_ENRAGED: return {"MECHANIC_ENRAGED", "MECHANIC_ENRAGED", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<Mechanics>::Count() { return 32; }
|
||||
template <>
|
||||
TC_API_EXPORT Mechanics Trinity::Impl::EnumUtils<Mechanics>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return MECHANIC_NONE;
|
||||
case 1: return MECHANIC_CHARM;
|
||||
case 2: return MECHANIC_DISORIENTED;
|
||||
case 3: return MECHANIC_DISARM;
|
||||
case 4: return MECHANIC_DISTRACT;
|
||||
case 5: return MECHANIC_FEAR;
|
||||
case 6: return MECHANIC_GRIP;
|
||||
case 7: return MECHANIC_ROOT;
|
||||
case 8: return MECHANIC_SLOW_ATTACK;
|
||||
case 9: return MECHANIC_SILENCE;
|
||||
case 10: return MECHANIC_SLEEP;
|
||||
case 11: return MECHANIC_SNARE;
|
||||
case 12: return MECHANIC_STUN;
|
||||
case 13: return MECHANIC_FREEZE;
|
||||
case 14: return MECHANIC_KNOCKOUT;
|
||||
case 15: return MECHANIC_BLEED;
|
||||
case 16: return MECHANIC_BANDAGE;
|
||||
case 17: return MECHANIC_POLYMORPH;
|
||||
case 18: return MECHANIC_BANISH;
|
||||
case 19: return MECHANIC_SHIELD;
|
||||
case 20: return MECHANIC_SHACKLE;
|
||||
case 21: return MECHANIC_MOUNT;
|
||||
case 22: return MECHANIC_INFECTED;
|
||||
case 23: return MECHANIC_TURN;
|
||||
case 24: return MECHANIC_HORROR;
|
||||
case 25: return MECHANIC_INVULNERABILITY;
|
||||
case 26: return MECHANIC_INTERRUPT;
|
||||
case 27: return MECHANIC_DAZE;
|
||||
case 28: return MECHANIC_DISCOVERY;
|
||||
case 29: return MECHANIC_IMMUNE_SHIELD;
|
||||
case 30: return MECHANIC_SAPPED;
|
||||
case 31: return MECHANIC_ENRAGED;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************\
|
||||
|* data for enum 'SpellDmgClass' in 'SharedDefines.h' auto-generated *|
|
||||
\*********************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellDmgClass>::ToString(SpellDmgClass value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_DAMAGE_CLASS_NONE: return {"SPELL_DAMAGE_CLASS_NONE", "None", ""};
|
||||
case SPELL_DAMAGE_CLASS_MAGIC: return {"SPELL_DAMAGE_CLASS_MAGIC", "Magic", ""};
|
||||
case SPELL_DAMAGE_CLASS_MELEE: return {"SPELL_DAMAGE_CLASS_MELEE", "Melee", ""};
|
||||
case SPELL_DAMAGE_CLASS_RANGED: return {"SPELL_DAMAGE_CLASS_RANGED", "Ranged", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellDmgClass>::Count() { return 4; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellDmgClass Trinity::Impl::EnumUtils<SpellDmgClass>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_DAMAGE_CLASS_NONE;
|
||||
case 1: return SPELL_DAMAGE_CLASS_MAGIC;
|
||||
case 2: return SPELL_DAMAGE_CLASS_MELEE;
|
||||
case 3: return SPELL_DAMAGE_CLASS_RANGED;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************\
|
||||
|* data for enum 'SpellPreventionType' in 'SharedDefines.h' auto-generated *|
|
||||
\***************************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellPreventionType>::ToString(SpellPreventionType value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELL_PREVENTION_TYPE_NONE: return {"SPELL_PREVENTION_TYPE_NONE", "None", ""};
|
||||
case SPELL_PREVENTION_TYPE_SILENCE: return {"SPELL_PREVENTION_TYPE_SILENCE", "Silence", ""};
|
||||
case SPELL_PREVENTION_TYPE_PACIFY: return {"SPELL_PREVENTION_TYPE_PACIFY", "Pacify", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellPreventionType>::Count() { return 3; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellPreventionType Trinity::Impl::EnumUtils<SpellPreventionType>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELL_PREVENTION_TYPE_NONE;
|
||||
case 1: return SPELL_PREVENTION_TYPE_SILENCE;
|
||||
case 2: return SPELL_PREVENTION_TYPE_PACIFY;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************\
|
||||
|* data for enum 'SpellFamilyNames' in 'SharedDefines.h' auto-generated *|
|
||||
\************************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText Trinity::Impl::EnumUtils<SpellFamilyNames>::ToString(SpellFamilyNames value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC: return {"SPELLFAMILY_GENERIC", "Generic", ""};
|
||||
case SPELLFAMILY_UNK1: return {"SPELLFAMILY_UNK1", "Unk1 (events, holidays, ...)", ""};
|
||||
case SPELLFAMILY_MAGE: return {"SPELLFAMILY_MAGE", "Mage", ""};
|
||||
case SPELLFAMILY_WARRIOR: return {"SPELLFAMILY_WARRIOR", "Warrior", ""};
|
||||
case SPELLFAMILY_WARLOCK: return {"SPELLFAMILY_WARLOCK", "Warlock", ""};
|
||||
case SPELLFAMILY_PRIEST: return {"SPELLFAMILY_PRIEST", "Priest", ""};
|
||||
case SPELLFAMILY_DRUID: return {"SPELLFAMILY_DRUID", "Druid", ""};
|
||||
case SPELLFAMILY_ROGUE: return {"SPELLFAMILY_ROGUE", "Rogue", ""};
|
||||
case SPELLFAMILY_HUNTER: return {"SPELLFAMILY_HUNTER", "Hunter", ""};
|
||||
case SPELLFAMILY_PALADIN: return {"SPELLFAMILY_PALADIN", "Paladin", ""};
|
||||
case SPELLFAMILY_SHAMAN: return {"SPELLFAMILY_SHAMAN", "Shaman", ""};
|
||||
case SPELLFAMILY_UNK2: return {"SPELLFAMILY_UNK2", "Unk2 (Silence resistance?)", ""};
|
||||
case SPELLFAMILY_POTION: return {"SPELLFAMILY_POTION", "Potion", ""};
|
||||
case SPELLFAMILY_DEATHKNIGHT: return {"SPELLFAMILY_DEATHKNIGHT", "Death Knight", ""};
|
||||
case SPELLFAMILY_PET: return {"SPELLFAMILY_PET", "Pet", ""};
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
template <>
|
||||
TC_API_EXPORT size_t Trinity::Impl::EnumUtils<SpellFamilyNames>::Count() { return 15; }
|
||||
template <>
|
||||
TC_API_EXPORT SpellFamilyNames Trinity::Impl::EnumUtils<SpellFamilyNames>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return SPELLFAMILY_GENERIC;
|
||||
case 1: return SPELLFAMILY_UNK1;
|
||||
case 2: return SPELLFAMILY_MAGE;
|
||||
case 3: return SPELLFAMILY_WARRIOR;
|
||||
case 4: return SPELLFAMILY_WARLOCK;
|
||||
case 5: return SPELLFAMILY_PRIEST;
|
||||
case 6: return SPELLFAMILY_DRUID;
|
||||
case 7: return SPELLFAMILY_ROGUE;
|
||||
case 8: return SPELLFAMILY_HUNTER;
|
||||
case 9: return SPELLFAMILY_PALADIN;
|
||||
case 10: return SPELLFAMILY_SHAMAN;
|
||||
case 11: return SPELLFAMILY_UNK2;
|
||||
case 12: return SPELLFAMILY_POTION;
|
||||
case 13: return SPELLFAMILY_DEATHKNIGHT;
|
||||
case 14: return SPELLFAMILY_PET;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user