Core/Misc: Kick a Totem error log upstairs one stack frame to give it access to various debug info and make Aokromes happy.
(cherry picked from commit e813200e5ef3eaade089cb0e8382905c80b6130d)
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "Totem.h"
|
||||
#include "Group.h"
|
||||
#include "Log.h"
|
||||
#include "Map.h"
|
||||
#include "Player.h"
|
||||
#include "SpellHistory.h"
|
||||
@@ -68,6 +69,9 @@ void Totem::InitStats(uint32 duration)
|
||||
// set display id depending on caster's race
|
||||
if (uint32 totemDisplayId = sSpellMgr->GetModelForTotem(m_unitData->CreatedBySpell, owner->GetRace()))
|
||||
SetDisplayId(totemDisplayId);
|
||||
else
|
||||
TC_LOG_ERROR("misc", "Totem with entry %u, does not have a specialized model for spell %u and race %s. Set to default.",
|
||||
GetEntry(), *m_unitData->CreatedBySpell, EnumUtils::ToTitle(Races(owner->GetRace())));
|
||||
}
|
||||
|
||||
Minion::InitStats(duration);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* 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
|
||||
|
||||
@@ -21,20 +21,21 @@
|
||||
#include "Define.h"
|
||||
#include <type_traits>
|
||||
|
||||
// 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_GOBLIN = 9,
|
||||
RACE_BLOODELF = 10,
|
||||
RACE_DRAENEI = 11,
|
||||
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, // TITLE Goblin
|
||||
RACE_BLOODELF = 10, // TITLE Blood Elf
|
||||
RACE_DRAENEI = 11, // TITLE Draenei
|
||||
//RACE_FEL_ORC = 12,
|
||||
//RACE_NAGA = 13,
|
||||
//RACE_BROKEN = 14,
|
||||
@@ -45,22 +46,22 @@ enum Races
|
||||
//RACE_TAUNKA = 19,
|
||||
//RACE_NORTHREND_SKELETON = 20,
|
||||
//RACE_ICE_TROLL = 21,
|
||||
RACE_WORGEN = 22,
|
||||
RACE_WORGEN = 22, // TITLE Worgen
|
||||
//RACE_GILNEAN = 23,
|
||||
RACE_PANDAREN_NEUTRAL = 24,
|
||||
RACE_PANDAREN_ALLIANCE = 25,
|
||||
RACE_PANDAREN_HORDE = 26,
|
||||
RACE_NIGHTBORNE = 27,
|
||||
RACE_HIGHMOUNTAIN_TAUREN = 28,
|
||||
RACE_VOID_ELF = 29,
|
||||
RACE_LIGHTFORGED_DRAENEI = 30,
|
||||
RACE_ZANDALARI_TROLL = 31,
|
||||
RACE_KUL_TIRAN = 32,
|
||||
RACE_PANDAREN_NEUTRAL = 24, // TITLE Pandaren DESCRIPTION Pandaren (Neutral)
|
||||
RACE_PANDAREN_ALLIANCE = 25, // TITLE Pandaren DESCRIPTION Pandaren (Alliance)
|
||||
RACE_PANDAREN_HORDE = 26, // TITLE Pandaren DESCRIPTION Pandaren (Horde)
|
||||
RACE_NIGHTBORNE = 27, // TITLE Nightborne
|
||||
RACE_HIGHMOUNTAIN_TAUREN = 28, // TITLE Highmountain Tauren
|
||||
RACE_VOID_ELF = 29, // TITLE Void Elf
|
||||
RACE_LIGHTFORGED_DRAENEI = 30, // TITLE Lightforged Draenei
|
||||
RACE_ZANDALARI_TROLL = 31, // TITLE Zandalari Troll
|
||||
RACE_KUL_TIRAN = 32, // TITLE Kul Tiran
|
||||
//RACE_THIN_HUMAN = 33,
|
||||
RACE_DARK_IRON_DWARF = 34, // RaceMask bit 11
|
||||
RACE_VULPERA = 35, // RaceMask bit 12
|
||||
RACE_MAGHAR_ORC = 36, // RaceMask bit 13
|
||||
RACE_MECHAGNOME = 37 // RaceMask bit 14
|
||||
RACE_DARK_IRON_DWARF = 34, // TITLE Dark Iron Dwarf DESCRIPTION Dark Iron Dwarf (RaceMask bit 11)
|
||||
RACE_VULPERA = 35, // TITLE Vulpera DESCRIPTION Vulpera (RaceMask bit 12)
|
||||
RACE_MAGHAR_ORC = 36, // TITLE Mag'har Orc DESCRIPTION Mag'har Orc (RaceMask bit 13)
|
||||
RACE_MECHAGNOME = 37 // TITLE Mechagnome DESCRIPTION Mechagnome (RaceMask bit 14)
|
||||
};
|
||||
|
||||
// max+1 for player race
|
||||
|
||||
@@ -133,21 +133,22 @@ enum Gender
|
||||
};
|
||||
|
||||
// Class value is index in ChrClasses.db2
|
||||
// EnumUtils: DESCRIBE THIS
|
||||
enum Classes : uint8
|
||||
{
|
||||
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_MONK = 10,
|
||||
CLASS_DRUID = 11,
|
||||
CLASS_DEMON_HUNTER = 12
|
||||
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_MONK = 10, // TITLE Monk
|
||||
CLASS_DRUID = 11, // TITLE Druid
|
||||
CLASS_DEMON_HUNTER = 12 // TITLE Demon Hunter
|
||||
};
|
||||
|
||||
// max+1 for player class
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* 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 "RaceMask.h"
|
||||
#include "Define.h"
|
||||
#include "SmartEnum.h"
|
||||
#include <stdexcept>
|
||||
|
||||
namespace Trinity
|
||||
{
|
||||
namespace Impl
|
||||
{
|
||||
|
||||
/********************************************************\
|
||||
|* data for enum 'Races' in 'RaceMask.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_GOBLIN: return { "RACE_GOBLIN", "Goblin", "" };
|
||||
case RACE_BLOODELF: return { "RACE_BLOODELF", "Blood Elf", "" };
|
||||
case RACE_DRAENEI: return { "RACE_DRAENEI", "Draenei", "" };
|
||||
case RACE_WORGEN: return { "RACE_WORGEN", "Worgen", "" };
|
||||
case RACE_PANDAREN_NEUTRAL: return { "RACE_PANDAREN_NEUTRAL", "Pandaren", "Pandaren (Neutral)" };
|
||||
case RACE_PANDAREN_ALLIANCE: return { "RACE_PANDAREN_ALLIANCE", "Pandaren", "Pandaren (Alliance)" };
|
||||
case RACE_PANDAREN_HORDE: return { "RACE_PANDAREN_HORDE", "Pandaren", "Pandaren (Horde)" };
|
||||
case RACE_NIGHTBORNE: return { "RACE_NIGHTBORNE", "Nightborne", "" };
|
||||
case RACE_HIGHMOUNTAIN_TAUREN: return { "RACE_HIGHMOUNTAIN_TAUREN", "Highmountain Tauren", "" };
|
||||
case RACE_VOID_ELF: return { "RACE_VOID_ELF", "Void Elf", "" };
|
||||
case RACE_LIGHTFORGED_DRAENEI: return { "RACE_LIGHTFORGED_DRAENEI", "Lightforged Draenei", "" };
|
||||
case RACE_ZANDALARI_TROLL: return { "RACE_ZANDALARI_TROLL", "Zandalari Troll", "" };
|
||||
case RACE_KUL_TIRAN: return { "RACE_KUL_TIRAN", "Kul Tiran", "" };
|
||||
case RACE_DARK_IRON_DWARF: return { "RACE_DARK_IRON_DWARF", "Dark Iron Dwarf", "Dark Iron Dwarf (RaceMask bit 11)" };
|
||||
case RACE_VULPERA: return { "RACE_VULPERA", "Vulpera", "Vulpera (RaceMask bit 12)" };
|
||||
case RACE_MAGHAR_ORC: return { "RACE_MAGHAR_ORC", "Mag'har Orc", "Mag'har Orc (RaceMask bit 13)" };
|
||||
case RACE_MECHAGNOME: return { "RACE_MECHAGNOME", "Mechagnome", "Mechagnome (RaceMask bit 14)" };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<Races>::Count() { return 25; }
|
||||
|
||||
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_GOBLIN;
|
||||
case 9: return RACE_BLOODELF;
|
||||
case 10: return RACE_DRAENEI;
|
||||
case 11: return RACE_WORGEN;
|
||||
case 12: return RACE_PANDAREN_NEUTRAL;
|
||||
case 13: return RACE_PANDAREN_ALLIANCE;
|
||||
case 14: return RACE_PANDAREN_HORDE;
|
||||
case 15: return RACE_NIGHTBORNE;
|
||||
case 16: return RACE_HIGHMOUNTAIN_TAUREN;
|
||||
case 17: return RACE_VOID_ELF;
|
||||
case 18: return RACE_LIGHTFORGED_DRAENEI;
|
||||
case 19: return RACE_ZANDALARI_TROLL;
|
||||
case 20: return RACE_KUL_TIRAN;
|
||||
case 21: return RACE_DARK_IRON_DWARF;
|
||||
case 22: return RACE_VULPERA;
|
||||
case 23: return RACE_MAGHAR_ORC;
|
||||
case 24: return RACE_MECHAGNOME;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,54 @@ namespace Trinity
|
||||
namespace Impl
|
||||
{
|
||||
|
||||
/***************************************************************\
|
||||
|* 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_MONK: return { "CLASS_MONK", "Monk", "" };
|
||||
case CLASS_DRUID: return { "CLASS_DRUID", "Druid", "" };
|
||||
case CLASS_DEMON_HUNTER: return { "CLASS_DEMON_HUNTER", "Demon Hunter", "" };
|
||||
default: throw std::out_of_range("value");
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
TC_API_EXPORT size_t EnumUtils<Classes>::Count() { return 12; }
|
||||
|
||||
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_MONK;
|
||||
case 10: return CLASS_DRUID;
|
||||
case 11: return CLASS_DEMON_HUNTER;
|
||||
default: throw std::out_of_range("index");
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************\
|
||||
|* data for enum 'Powers' in 'SharedDefines.h' auto-generated *|
|
||||
\**************************************************************/
|
||||
|
||||
@@ -4591,7 +4591,7 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
{
|
||||
spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_INITIAL_AGGRO;
|
||||
});
|
||||
|
||||
|
||||
// Spore - Spore Visual
|
||||
ApplySpellFix({ 42525 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
@@ -4848,7 +4848,6 @@ uint32 SpellMgr::GetModelForTotem(uint32 spellId, uint8 race) const
|
||||
if (itr != mSpellTotemModel.end())
|
||||
return itr->second;
|
||||
|
||||
TC_LOG_ERROR("spells", "Spell %u with RaceID (%u) have no totem model data defined, set to default model.", spellId, race);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user