refactor(Core): Use database tables for Shaman totems and Druid shapeshift forms. (#22104)

Co-authored-by: DoctorKraft <25483209+doctorkraft@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
This commit is contained in:
Benjamin Jackson
2025-05-27 09:40:57 -04:00
committed by GitHub
parent c10e4dc015
commit db18d5b035
12 changed files with 356 additions and 298 deletions
+4 -4
View File
@@ -51,17 +51,17 @@ void Totem::InitStats(uint32 duration)
if (Unit* owner = ObjectAccessor::GetUnit(*this, m_owner))
{
uint32 slot = m_Properties->Slot;
if (owner->IsPlayer() && slot >= SUMMON_SLOT_TOTEM && slot < MAX_TOTEM_SLOT)
if (owner->IsPlayer() && slot >= SUMMON_SLOT_TOTEM_FIRE && slot < MAX_TOTEM_SLOT)
{
WorldPackets::Totem::TotemCreated data;
data.Totem = GetGUID();
data.Slot = slot - SUMMON_SLOT_TOTEM;
data.Slot = slot - SUMMON_SLOT_TOTEM_FIRE;
data.Duration = duration;
data.SpellID = GetUInt32Value(UNIT_CREATED_BY_SPELL);
owner->ToPlayer()->SendDirectMessage(data.Write());
// set display id depending on caster's race
SetDisplayId(owner->GetModelForTotem(PlayerTotemType(m_Properties->Id)));
SetDisplayId(sObjectMgr->GetModelForTotem(SummonSlot(slot), Races(owner->getRace())));
}
SetLevel(owner->GetLevel());
@@ -133,7 +133,7 @@ void Totem::UnSummon(uint32 msTime)
if (Unit* owner = GetOwner())
{
// clear owner's totem slot
for (uint8 i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
for (uint8 i = SUMMON_SLOT_TOTEM_FIRE; i < MAX_TOTEM_SLOT; ++i)
{
if (owner->m_SummonSlot[i] == GetGUID())
{