Core/Packets: Update and enable CMSG_STAND_STATE_CHANGE and SMSG_STAND_STATE_UPDATE
This commit is contained in:
@@ -1315,8 +1315,8 @@ void GameObject::Use(Unit* user)
|
||||
{
|
||||
if (Player* ChairUser = ObjectAccessor::FindPlayer(itr->second))
|
||||
{
|
||||
if (ChairUser->IsSitState() && ChairUser->getStandState() != UNIT_STAND_STATE_SIT && ChairUser->GetExactDist2d(x_i, y_i) < 0.1f)
|
||||
continue; // This seat is already occupied by ChairUser. NOTE: Not sure if the ChairUser->getStandState() != UNIT_STAND_STATE_SIT check is required.
|
||||
if (ChairUser->IsSitState() && ChairUser->GetStandState() != UNIT_STAND_STATE_SIT && ChairUser->GetExactDist2d(x_i, y_i) < 0.1f)
|
||||
continue; // This seat is already occupied by ChairUser. NOTE: Not sure if the ChairUser->GetStandState() != UNIT_STAND_STATE_SIT check is required.
|
||||
else
|
||||
itr->second.Clear(); // This seat is unoccupied.
|
||||
}
|
||||
@@ -1345,7 +1345,7 @@ void GameObject::Use(Unit* user)
|
||||
{
|
||||
itr->second = player->GetGUID(); //this slot in now used by player
|
||||
player->TeleportTo(GetMapId(), x_lowest, y_lowest, GetPositionZ(), GetOrientation(), TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET);
|
||||
player->SetStandState(UNIT_STAND_STATE_SIT_LOW_CHAIR + info->chair.chairheight);
|
||||
player->SetStandState(UnitStandStateType(UNIT_STAND_STATE_SIT_LOW_CHAIR + info->chair.chairheight));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1773,7 +1773,7 @@ void GameObject::Use(Unit* user)
|
||||
WorldPacket data(SMSG_ENABLE_BARBER_SHOP, 0);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
player->SetStandState(UNIT_STAND_STATE_SIT_LOW_CHAIR+info->barberChair.chairheight);
|
||||
player->SetStandState(UnitStandStateType(UNIT_STAND_STATE_SIT_LOW_CHAIR + info->barberChair.chairheight));
|
||||
return;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user