mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[9009] More fixes in pet action bar buttons swap.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
16b39c1ebf
commit
41b0b88674
2 changed files with 18 additions and 12 deletions
|
|
@ -352,22 +352,28 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check swap
|
// check swap (at command->spell swap client remove spell first in another packet, so check only command move correctness)
|
||||||
if (move_command)
|
if (move_command)
|
||||||
{
|
{
|
||||||
uint8 act_state_0 = UNIT_ACTION_BUTTON_TYPE(data[0]);
|
uint8 act_state_0 = UNIT_ACTION_BUTTON_TYPE(data[0]);
|
||||||
uint32 spell_id_0 = UNIT_ACTION_BUTTON_ACTION(data[0]);
|
if(act_state_0 == ACT_COMMAND || act_state_0 == ACT_REACTION)
|
||||||
UnitActionBarEntry const* actionEntry_1 = charmInfo->GetActionBarEntry(position[1]);
|
{
|
||||||
if (!actionEntry_1 || spell_id_0 != actionEntry_1->GetAction() ||
|
uint32 spell_id_0 = UNIT_ACTION_BUTTON_ACTION(data[0]);
|
||||||
act_state_0 != actionEntry_1->GetType())
|
UnitActionBarEntry const* actionEntry_1 = charmInfo->GetActionBarEntry(position[1]);
|
||||||
return;
|
if (!actionEntry_1 || spell_id_0 != actionEntry_1->GetAction() ||
|
||||||
|
act_state_0 != actionEntry_1->GetType())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
uint8 act_state_1 = UNIT_ACTION_BUTTON_TYPE(data[1]);
|
uint8 act_state_1 = UNIT_ACTION_BUTTON_TYPE(data[1]);
|
||||||
uint32 spell_id_1 = UNIT_ACTION_BUTTON_ACTION(data[1]);
|
if(act_state_1 == ACT_COMMAND || act_state_1 == ACT_REACTION)
|
||||||
UnitActionBarEntry const* actionEntry_0 = charmInfo->GetActionBarEntry(position[0]);
|
{
|
||||||
if (!actionEntry_0 || spell_id_1 != actionEntry_0->GetAction() ||
|
uint32 spell_id_1 = UNIT_ACTION_BUTTON_ACTION(data[1]);
|
||||||
act_state_1 != actionEntry_0->GetType())
|
UnitActionBarEntry const* actionEntry_0 = charmInfo->GetActionBarEntry(position[0]);
|
||||||
return;
|
if (!actionEntry_0 || spell_id_1 != actionEntry_0->GetAction() ||
|
||||||
|
act_state_1 != actionEntry_0->GetType())
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(uint8 i = 0; i < count; ++i)
|
for(uint8 i = 0; i < count; ++i)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9008"
|
#define REVISION_NR "9009"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue