mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-23 07:00:04 -04:00
Core/Misc: Kick a Totem error log upstairs one stack frame to give it access to various debug info and make Aokromes happy.
This commit is contained in:
@@ -29,6 +29,7 @@ if not getcwd().endswith('src'):
|
||||
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)
|
||||
EnumValueSkipLinePattern = compile(r'^\s*//')
|
||||
EnumValueCommentPattern = compile(r'//[ \t]*([^\n]+)$')
|
||||
CommentMatchFormat = compile(r'^(((TITLE +(.+?))|(DESCRIPTION +(.+?))) *){1,2}$')
|
||||
CommentSkipFormat = compile(r'^SKIP *$')
|
||||
@@ -59,7 +60,8 @@ def processFile(path, filename):
|
||||
|
||||
valueNameMatch = EnumValueNamePattern.search(valueData)
|
||||
if valueNameMatch is None:
|
||||
print('Name of value not found: %s' % repr(valueData))
|
||||
if EnumValueSkipLinePattern.search(valueData) is None:
|
||||
print('Name of value not found: %s' % repr(valueData))
|
||||
continue
|
||||
valueName = valueNameMatch.group(1)
|
||||
|
||||
|
||||
@@ -70,6 +70,9 @@ void Totem::InitStats(uint32 duration)
|
||||
// set display id depending on caster's race
|
||||
if (uint32 totemDisplayId = sObjectMgr->GetModelForTotem(SummonSlot(slot), Races(owner->GetRace())))
|
||||
SetDisplayId(totemDisplayId);
|
||||
else
|
||||
TC_LOG_ERROR("misc", "Totem with entry %u, owned by player guidlow %u (%u %s %s) in slot %u, created by spell %u, does not have a specialized model. Set to default.",
|
||||
GetEntry(), owner->GetGUID().GetCounter(), owner->GetLevel(), EnumUtils::ToTitle(Races(owner->GetRace())), EnumUtils::ToTitle(Classes(owner->GetClass())), slot, GetUInt32Value(UNIT_CREATED_BY_SPELL));
|
||||
}
|
||||
|
||||
Minion::InitStats(duration);
|
||||
|
||||
@@ -1733,8 +1733,6 @@ uint32 ObjectMgr::GetModelForTotem(SummonSlot totemSlot, Races race) const
|
||||
auto itr = _playerTotemModel.find(std::make_pair(totemSlot, race));
|
||||
if (itr != _playerTotemModel.end())
|
||||
return itr->second;
|
||||
|
||||
TC_LOG_ERROR("misc", "TotemSlot %u with RaceID (%u) have no totem model data defined, set to default model.", totemSlot, race);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,20 +79,21 @@ enum Gender
|
||||
};
|
||||
|
||||
// Race value is index in ChrRaces.dbc
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum Races
|
||||
{
|
||||
RACE_NONE = 0,
|
||||
RACE_HUMAN = 1,
|
||||
RACE_ORC = 2,
|
||||
RACE_DWARF = 3,
|
||||
RACE_NIGHTELF = 4,
|
||||
RACE_UNDEAD_PLAYER = 5,
|
||||
RACE_TAUREN = 6,
|
||||
RACE_GNOME = 7,
|
||||
RACE_TROLL = 8,
|
||||
RACE_NONE = 0, // SKIP
|
||||
RACE_HUMAN = 1, // TITLE Human
|
||||
RACE_ORC = 2, // TITLE Orc
|
||||
RACE_DWARF = 3, // TITLE Dwarf
|
||||
RACE_NIGHTELF = 4, // TITLE Night Elf
|
||||
RACE_UNDEAD_PLAYER = 5, // TITLE Undead
|
||||
RACE_TAUREN = 6, // TITLE Tauren
|
||||
RACE_GNOME = 7, // TITLE Gnome
|
||||
RACE_TROLL = 8, // TITLE Troll
|
||||
//RACE_GOBLIN = 9,
|
||||
RACE_BLOODELF = 10,
|
||||
RACE_DRAENEI = 11
|
||||
RACE_BLOODELF = 10, // TITLE Blood Elf
|
||||
RACE_DRAENEI = 11 // TITLE Draenei
|
||||
//RACE_FEL_ORC = 12,
|
||||
//RACE_NAGA = 13,
|
||||
//RACE_BROKEN = 14,
|
||||
@@ -121,20 +122,21 @@ enum Races
|
||||
#define RACEMASK_HORDE RACEMASK_ALL_PLAYABLE & ~RACEMASK_ALLIANCE
|
||||
|
||||
// Class value is index in ChrClasses.dbc
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum Classes
|
||||
{
|
||||
CLASS_NONE = 0,
|
||||
CLASS_WARRIOR = 1,
|
||||
CLASS_PALADIN = 2,
|
||||
CLASS_HUNTER = 3,
|
||||
CLASS_ROGUE = 4,
|
||||
CLASS_PRIEST = 5,
|
||||
CLASS_DEATH_KNIGHT = 6,
|
||||
CLASS_SHAMAN = 7,
|
||||
CLASS_MAGE = 8,
|
||||
CLASS_WARLOCK = 9,
|
||||
CLASS_NONE = 0, // SKIP
|
||||
CLASS_WARRIOR = 1, // TITLE Warrior
|
||||
CLASS_PALADIN = 2, // TITLE Paladin
|
||||
CLASS_HUNTER = 3, // TITLE Hunter
|
||||
CLASS_ROGUE = 4, // TITLE Rogue
|
||||
CLASS_PRIEST = 5, // TITLE Priest
|
||||
CLASS_DEATH_KNIGHT = 6, // TITLE Death Knight
|
||||
CLASS_SHAMAN = 7, // TITLE Shaman
|
||||
CLASS_MAGE = 8, // TITLE Mage
|
||||
CLASS_WARLOCK = 9, // TITLE Warlock
|
||||
//CLASS_UNK = 10,
|
||||
CLASS_DRUID = 11
|
||||
CLASS_DRUID = 11 // TITLE Druid
|
||||
};
|
||||
|
||||
// max+1 for player class
|
||||
|
||||
@@ -25,6 +25,94 @@ namespace Trinity
|
||||
namespace Impl
|
||||
{
|
||||
|
||||
/*************************************************************\
|
||||
|* data for enum 'Races' in 'SharedDefines.h' auto-generated *|
|
||||
\*************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText EnumUtils<Races>::ToString(Races value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case RACE_HUMAN: return { "RACE_HUMAN", "Human", "" };
|
||||
case RACE_ORC: return { "RACE_ORC", "Orc", "" };
|
||||
case RACE_DWARF: return { "RACE_DWARF", "Dwarf", "" };
|
||||
case RACE_NIGHTELF: return { "RACE_NIGHTELF", "Night Elf", "" };
|
||||
case RACE_UNDEAD_PLAYER: return { "RACE_UNDEAD_PLAYER", "Undead", "" };
|
||||
case RACE_TAUREN: return { "RACE_TAUREN", "Tauren", "" };
|
||||
case RACE_GNOME: return { "RACE_GNOME", "Gnome", "" };
|
||||
case RACE_TROLL: return { "RACE_TROLL", "Troll", "" };
|
||||
case RACE_BLOODELF: return { "RACE_BLOODELF", "Blood Elf", "" };
|
||||
case RACE_DRAENEI: return { "RACE_DRAENEI", "RACE_DRAENEI", "RACE_FEL_ORC = 12," };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<Races>::Count() { return 10; }
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT Races EnumUtils<Races>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return RACE_HUMAN;
|
||||
case 1: return RACE_ORC;
|
||||
case 2: return RACE_DWARF;
|
||||
case 3: return RACE_NIGHTELF;
|
||||
case 4: return RACE_UNDEAD_PLAYER;
|
||||
case 5: return RACE_TAUREN;
|
||||
case 6: return RACE_GNOME;
|
||||
case 7: return RACE_TROLL;
|
||||
case 8: return RACE_BLOODELF;
|
||||
case 9: return RACE_DRAENEI;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************\
|
||||
|* data for enum 'Classes' in 'SharedDefines.h' auto-generated *|
|
||||
\***************************************************************/
|
||||
template <>
|
||||
TC_API_EXPORT EnumText EnumUtils<Classes>::ToString(Classes value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case CLASS_WARRIOR: return { "CLASS_WARRIOR", "Warrior", "" };
|
||||
case CLASS_PALADIN: return { "CLASS_PALADIN", "Paladin", "" };
|
||||
case CLASS_HUNTER: return { "CLASS_HUNTER", "Hunter", "" };
|
||||
case CLASS_ROGUE: return { "CLASS_ROGUE", "Rogue", "" };
|
||||
case CLASS_PRIEST: return { "CLASS_PRIEST", "Priest", "" };
|
||||
case CLASS_DEATH_KNIGHT: return { "CLASS_DEATH_KNIGHT", "Death Knight", "" };
|
||||
case CLASS_SHAMAN: return { "CLASS_SHAMAN", "Shaman", "" };
|
||||
case CLASS_MAGE: return { "CLASS_MAGE", "Mage", "" };
|
||||
case CLASS_WARLOCK: return { "CLASS_WARLOCK", "Warlock", "" };
|
||||
case CLASS_DRUID: return { "CLASS_DRUID", "Druid", "" };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<Classes>::Count() { return 10; }
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT Classes EnumUtils<Classes>::FromIndex(size_t index)
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case 0: return CLASS_WARRIOR;
|
||||
case 1: return CLASS_PALADIN;
|
||||
case 2: return CLASS_HUNTER;
|
||||
case 3: return CLASS_ROGUE;
|
||||
case 4: return CLASS_PRIEST;
|
||||
case 5: return CLASS_DEATH_KNIGHT;
|
||||
case 6: return CLASS_SHAMAN;
|
||||
case 7: return CLASS_MAGE;
|
||||
case 8: return CLASS_WARLOCK;
|
||||
case 9: return CLASS_DRUID;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************\
|
||||
|* data for enum 'Powers' in 'SharedDefines.h' auto-generated *|
|
||||
\**************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user