diff options
| author | Nayd <dnpd.dd@gmail.com> | 2015-01-28 19:29:31 +0000 |
|---|---|---|
| committer | Nayd <dnpd.dd@gmail.com> | 2015-01-28 19:29:31 +0000 |
| commit | 802725817bcdab6a838e2b86a22bbe10b03370d4 (patch) | |
| tree | badf450c35034dc897a16ff7f9064d61a5711ee6 /src/server/game/Entities/GameObject | |
| parent | 7dc90b4efd086a7c8005705c4cf20a23daf7b333 (diff) | |
Core/Packets: Update and enable CMSG_STAND_STATE_CHANGE and SMSG_STAND_STATE_UPDATE
Diffstat (limited to 'src/server/game/Entities/GameObject')
| -rw-r--r-- | src/server/game/Entities/GameObject/GameObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 78efc590566..bb4bed9f79a 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -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: |
