Skip to content

Commit

Permalink
Remove raw WorldPacket building for SMSG_INVENTORY_CHANGE_FAILURE (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shauren authored Jul 23, 2024
1 parent 7655961 commit a34affc
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions hooks/ItemHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,7 @@ bool Eluna::OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)

// Send equip error that shows no message
// This is a hack fix to stop spell casting visual bug when a spell is not cast on use
WorldPacket data(SMSG_INVENTORY_CHANGE_FAILURE, 18);
data << uint8(59); // EQUIP_ERR_NONE / EQUIP_ERR_CANT_BE_DISENCHANTED
data << guid;
data << ObjectGuid(uint64(0));
data << uint8(0);
#if defined CMANGOS
pPlayer->GetSession()->SendPacket(data);
#else
pPlayer->GetSession()->SendPacket(&data);
#endif
pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, nullptr);
return false;
}

Expand Down

0 comments on commit a34affc

Please sign in to comment.