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:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user