mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
More work on pet spells, typo fix
This commit is contained in:
parent
7adf2001f3
commit
d48844a699
9 changed files with 146 additions and 123 deletions
|
|
@ -155,7 +155,6 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
|||
}
|
||||
break;
|
||||
case ACT_DISABLED: //0x8100 spell (disabled), ignore
|
||||
case ACT_CAST: //0x0100
|
||||
case ACT_ENABLED: //0xc100 spell
|
||||
{
|
||||
Unit* unit_target;
|
||||
|
|
@ -349,7 +348,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
|
|||
sLog.outDetail( "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X\n", _player->GetName(), position, spell_id, act_state);
|
||||
|
||||
//if it's act for spell (en/disable/cast) and there is a spell given (0 = remove spell) which pet doesn't know, don't add
|
||||
if(!((act_state == ACT_ENABLED || act_state == ACT_DISABLED || act_state == ACT_CAST) && spell_id && !pet->HasSpell(spell_id)))
|
||||
if(!((act_state == ACT_ENABLED || act_state == ACT_DISABLED) && spell_id && !pet->HasSpell(spell_id)))
|
||||
{
|
||||
//sign for autocast
|
||||
if(act_state == ACT_ENABLED && spell_id)
|
||||
|
|
@ -519,7 +518,8 @@ void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket)
|
|||
{
|
||||
uint32 spell_id = itr->first; // Pet::removeSpell can invalidate iterator at erase NEW spell
|
||||
++itr;
|
||||
pet->removeSpell(spell_id);
|
||||
//pet->removeSpell(spell_id);
|
||||
pet->unlearnSpell(spell_id);
|
||||
}
|
||||
|
||||
for(uint8 i = 0; i < 10; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue