diff options
author | Treeston <treeston.mmoc@gmail.com> | 2016-08-20 12:43:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-20 12:43:04 +0200 |
commit | 8deda7ed7f18615937ec5db2d30a6badc3b157c1 (patch) | |
tree | 2b8d8e7f2795877ad86bad3a8312f48b31c41987 /src/server/game/Handlers/SpellHandler.cpp | |
parent | d3495da30bdfa9c198a2f304c29a1b0b994bf4c4 (diff) |
Entities/Unit: Cleanup refactor. Changes: (#17819)
+ Unit::m_movedPlayer -> Unit::m_playerMovingMe
+ Player::m_mover -> Player::m_unitMovedByMe
+ Unit::GetMover() -> Unit::GetUnitBeingMoved()
+ Unit::GetPlayerMover() -> Unit::GetPlayerBeingMoved()
+ NEW: Unit::GetClientControllingPlayer()
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/SpellHandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 4b2bd4f246e..cbc9be3b140 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -61,7 +61,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket) Player* pUser = _player; // ignore for remote control state - if (pUser->m_mover != pUser) + if (pUser->m_unitMovedByMe != pUser) return; uint8 bagIndex, slot, castFlags; @@ -172,7 +172,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket) Player* pUser = _player; // ignore for remote control state - if (pUser->m_mover != pUser) + if (pUser->m_unitMovedByMe != pUser) return; uint8 bagIndex, slot; @@ -271,8 +271,8 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData) if (GameObject* obj = GetPlayer()->GetGameObjectIfCanInteractWith(guid)) { // ignore for remote control state - if (GetPlayer()->m_mover != GetPlayer()) - if (!(GetPlayer()->IsOnVehicle(GetPlayer()->m_mover) || GetPlayer()->IsMounted()) && !obj->GetGOInfo()->IsUsableMounted()) + if (GetPlayer()->m_unitMovedByMe != GetPlayer()) + if (!(GetPlayer()->IsOnVehicle(GetPlayer()->m_unitMovedByMe) || GetPlayer()->IsMounted()) && !obj->GetGOInfo()->IsUsableMounted()) return; obj->Use(GetPlayer()); @@ -287,7 +287,7 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket) TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [%s]", guid.ToString().c_str()); // ignore for remote control state - if (_player->m_mover != _player) + if (_player->m_unitMovedByMe != _player) return; if (GameObject* go = GetPlayer()->GetGameObjectIfCanInteractWith(guid)) @@ -308,7 +308,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) TC_LOG_DEBUG("network", "WORLD: got cast spell packet, castCount: %u, spellId: %u, castFlags: %u, data length = %u", castCount, spellId, castFlags, (uint32)recvPacket.size()); // ignore for remote control state (for player case) - Unit* mover = _player->m_mover; + Unit* mover = _player->m_unitMovedByMe; if (mover != _player && mover->GetTypeId() == TYPEID_PLAYER) { recvPacket.rfinish(); // prevent spam at ignore packet @@ -500,7 +500,7 @@ void WorldSession::HandleCancelChanneling(WorldPacket& recvData) recvData.read_skip<uint32>(); // spellid, not used // ignore for remote control state (for player case) - Unit* mover = _player->m_mover; + Unit* mover = _player->m_unitMovedByMe; if (mover != _player && mover->GetTypeId() == TYPEID_PLAYER) return; @@ -510,7 +510,7 @@ void WorldSession::HandleCancelChanneling(WorldPacket& recvData) void WorldSession::HandleTotemDestroyed(WorldPacket& recvPacket) { // ignore for remote control state - if (_player->m_mover != _player) + if (_player->m_unitMovedByMe != _player) return; uint8 slotId; |