mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
[7776] Completed implementation of CMSG_SPELLCLICK Author: arrai
For vehicles, you have to add the correct SPELL_AURA_CONTROL_VEHICLE spells to
npc_spellclick_spells, otherwise you won't be able to use them
--HG--
branch : trunk
This commit is contained in:
@@ -1686,29 +1686,6 @@ void WorldSession::HandleSetTaxiBenchmarkOpcode( WorldPacket & recv_data )
|
||||
sLog.outDebug("Client used \"/timetest %d\" command", mode);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSpellClick( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8);
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
Creature *creature = NULL;
|
||||
if(IS_VEHICLE_GUID(guid))
|
||||
{
|
||||
Vehicle *vehicle = ObjectAccessor::GetVehicle(guid);
|
||||
if(vehicle)
|
||||
{
|
||||
_player->EnterVehicle(vehicle);
|
||||
creature = vehicle;
|
||||
}
|
||||
}
|
||||
if(!creature)
|
||||
creature = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
|
||||
if(creature && creature->IsAIEnabled)
|
||||
creature->AI()->SpellClick(_player);
|
||||
}
|
||||
|
||||
void WorldSession::HandleInspectAchievements( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 1);
|
||||
|
||||
Reference in New Issue
Block a user