mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[9992] Fixed MSG_PARTY_ASSIGNMENT processing.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
4206230f0d
commit
db93e78f50
4 changed files with 49 additions and 20 deletions
|
|
@ -555,9 +555,10 @@ void WorldSession::HandleGroupAssistantLeaderOpcode( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandlePartyAssignmentOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
uint8 flag1, flag2;
|
||||
uint8 role;
|
||||
uint8 apply;
|
||||
uint64 guid;
|
||||
recv_data >> flag1 >> flag2;
|
||||
recv_data >> role >> apply; // role 0 = Main Tank, 1 = Main Assistant
|
||||
recv_data >> guid;
|
||||
|
||||
DEBUG_LOG("MSG_PARTY_ASSIGNMENT");
|
||||
|
|
@ -566,21 +567,28 @@ void WorldSession::HandlePartyAssignmentOpcode( WorldPacket & recv_data )
|
|||
if(!group)
|
||||
return;
|
||||
|
||||
// if(flag1) Main Assist
|
||||
// 0x4
|
||||
// if(flag2) Main Tank
|
||||
// 0x2
|
||||
|
||||
/** error handling **/
|
||||
if(!group->IsLeader(GetPlayer()->GetGUID()))
|
||||
return;
|
||||
/********************/
|
||||
|
||||
// everything is fine, do it
|
||||
if(flag1 == 1)
|
||||
group->SetMainAssistant(guid);
|
||||
if(flag2 == 1)
|
||||
group->SetMainTank(guid);
|
||||
if (apply)
|
||||
{
|
||||
switch(role)
|
||||
{
|
||||
case 0: group->SetMainTank(guid); break;
|
||||
case 1: group->SetMainAssistant(guid); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (group->GetMainTank() == guid)
|
||||
group->SetMainTank(0);
|
||||
if (group->GetMainAssistant() == guid)
|
||||
group->SetMainAssistant(0);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleRaidReadyCheckOpcode( WorldPacket & recv_data )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue