chore(Core/Spell): SpellId's should always be uint32 (#6466)

* chore(Core/Spell): SpellId's should always be uint32

* Update spell_item.cpp
This commit is contained in:
Kitzunu
2021-06-25 02:11:36 +02:00
committed by GitHub
parent ea5b1b3846
commit 5d66e57181
3 changed files with 5 additions and 5 deletions

View File

@@ -479,7 +479,7 @@ void WorldSession::HandlePetStopAttack(WorldPacket& recvData)
pet->ClearInPetCombat();
}
void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint16 spellid, uint16 flag, ObjectGuid guid2)
void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spellid, uint16 flag, ObjectGuid guid2)
{
CharmInfo* charmInfo = pet->GetCharmInfo();
if (!charmInfo)

View File

@@ -776,7 +776,7 @@ public: // opcodes handlers
//Pet
void HandlePetAction(WorldPacket& recvData);
void HandlePetStopAttack(WorldPacket& recvData);
void HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint16 spellid, uint16 flag, ObjectGuid guid2);
void HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spellid, uint16 flag, ObjectGuid guid2);
void HandlePetNameQuery(WorldPacket& recvData);
void HandlePetSetAction(WorldPacket& recvData);
void HandlePetAbandon(WorldPacket& recvData);

View File

@@ -288,7 +288,7 @@ public:
return true;
}
uint16 getMountSpellId()
uint32 getMountSpellId()
{
switch (m_scriptSpellId)
{
@@ -308,7 +308,7 @@ public:
Unit* target = GetTarget();
if (target->getLevel() <= 70)
{
if (uint16 spellId = getMountSpellId())
if (auto spellId = getMountSpellId())
{
target->CastSpell(target, spellId, aurEff);
}
@@ -318,7 +318,7 @@ public:
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
if (uint16 spellId = getMountSpellId())
if (auto spellId = getMountSpellId())
{
target->RemoveAurasDueToSpell(spellId);
}