[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:
megamage
2009-05-05 16:56:15 -05:00
parent dcb2b5aa01
commit e69d2cbed9
18 changed files with 228 additions and 42 deletions

View File

@@ -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);