aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/MiscHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/MiscHandler.cpp')
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index fab4f104900..8087463d58f 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -599,7 +599,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPackets::AreaTrigger::AreaTrigge
return;
bool teleported = false;
- if (player->GetMapId() != at->target_mapId)
+ if (player->GetMapId() != at->Loc.GetMapId())
{
if (!player->IsAlive())
{
@@ -609,7 +609,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPackets::AreaTrigger::AreaTrigge
uint32 corpseMap = player->GetCorpseLocation().GetMapId();
do
{
- if (corpseMap == at->target_mapId)
+ if (corpseMap == at->Loc.GetMapId())
break;
InstanceTemplate const* corpseInstance = sObjectMgr->GetInstanceTemplate(corpseMap);
@@ -622,52 +622,52 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPackets::AreaTrigger::AreaTrigge
return;
}
- TC_LOG_DEBUG("maps", "MAP: Player '{}' has corpse in instance {} and can enter.", player->GetName(), at->target_mapId);
+ TC_LOG_DEBUG("maps", "MAP: Player '{}' has corpse in instance {} and can enter.", player->GetName(), at->Loc.GetMapId());
}
else
TC_LOG_DEBUG("maps", "Map::CanPlayerEnter - player '{}' is dead but does not have a corpse!", player->GetName());
}
- if (TransferAbortParams denyReason = Map::PlayerCannotEnter(at->target_mapId, player))
+ if (TransferAbortParams denyReason = Map::PlayerCannotEnter(at->Loc.GetMapId(), player))
{
switch (denyReason.Reason)
{
case TRANSFER_ABORT_MAP_NOT_ALLOWED:
- TC_LOG_DEBUG("maps", "MAP: Player '{}' attempted to enter map with id {} which has no entry", player->GetName(), at->target_mapId);
+ TC_LOG_DEBUG("maps", "MAP: Player '{}' attempted to enter map with id {} which has no entry", player->GetName(), at->Loc.GetMapId());
break;
case TRANSFER_ABORT_DIFFICULTY:
- TC_LOG_DEBUG("maps", "MAP: Player '{}' attempted to enter instance map {} but the requested difficulty was not found", player->GetName(), at->target_mapId);
+ TC_LOG_DEBUG("maps", "MAP: Player '{}' attempted to enter instance map {} but the requested difficulty was not found", player->GetName(), at->Loc.GetMapId());
break;
case TRANSFER_ABORT_NEED_GROUP:
- TC_LOG_DEBUG("maps", "MAP: Player '{}' must be in a raid group to enter map {}", player->GetName(), at->target_mapId);
+ TC_LOG_DEBUG("maps", "MAP: Player '{}' must be in a raid group to enter map {}", player->GetName(), at->Loc.GetMapId());
player->SendRaidGroupOnlyMessage(RAID_GROUP_ERR_ONLY, 0);
break;
case TRANSFER_ABORT_LOCKED_TO_DIFFERENT_INSTANCE:
- TC_LOG_DEBUG("maps", "MAP: Player '{}' cannot enter instance map {} because their permanent bind is incompatible with their group's", player->GetName(), at->target_mapId);
+ TC_LOG_DEBUG("maps", "MAP: Player '{}' cannot enter instance map {} because their permanent bind is incompatible with their group's", player->GetName(), at->Loc.GetMapId());
break;
case TRANSFER_ABORT_ALREADY_COMPLETED_ENCOUNTER:
- TC_LOG_DEBUG("maps", "MAP: Player '{}' cannot enter instance map {} because their permanent bind is incompatible with their group's", player->GetName(), at->target_mapId);
+ TC_LOG_DEBUG("maps", "MAP: Player '{}' cannot enter instance map {} because their permanent bind is incompatible with their group's", player->GetName(), at->Loc.GetMapId());
break;
case TRANSFER_ABORT_TOO_MANY_INSTANCES:
- TC_LOG_DEBUG("maps", "MAP: Player '{}' cannot enter instance map {} because he has exceeded the maximum number of instances per hour.", player->GetName(), at->target_mapId);
+ TC_LOG_DEBUG("maps", "MAP: Player '{}' cannot enter instance map {} because he has exceeded the maximum number of instances per hour.", player->GetName(), at->Loc.GetMapId());
break;
case TRANSFER_ABORT_MAX_PLAYERS:
break;
case TRANSFER_ABORT_ZONE_IN_COMBAT:
break;
case TRANSFER_ABORT_NOT_FOUND:
- TC_LOG_DEBUG("maps", "MAP: Player '{}' cannot enter instance map {} because instance is resetting.", player->GetName(), at->target_mapId);
+ TC_LOG_DEBUG("maps", "MAP: Player '{}' cannot enter instance map {} because instance is resetting.", player->GetName(), at->Loc.GetMapId());
break;
default:
break;
}
if (denyReason.Reason != TRANSFER_ABORT_NEED_GROUP)
- player->SendTransferAborted(at->target_mapId, denyReason.Reason, denyReason.Arg, denyReason.MapDifficultyXConditionId);
+ player->SendTransferAborted(at->Loc.GetMapId(), denyReason.Reason, denyReason.Arg, denyReason.MapDifficultyXConditionId);
if (!player->IsAlive() && player->HasCorpse())
{
- if (player->GetCorpseLocation().GetMapId() == at->target_mapId)
+ if (player->GetCorpseLocation().GetMapId() == at->Loc.GetMapId())
{
player->ResurrectPlayer(0.5f);
player->SpawnCorpseBones();
@@ -684,11 +684,11 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPackets::AreaTrigger::AreaTrigge
if (!teleported)
{
- WorldSafeLocsEntry const* entranceLocation = player->GetInstanceEntrance(at->target_mapId);
- if (entranceLocation && player->GetMapId() != at->target_mapId)
+ WorldSafeLocsEntry const* entranceLocation = player->GetInstanceEntrance(at->Loc.GetMapId());
+ if (entranceLocation && player->GetMapId() != at->Loc.GetMapId())
player->TeleportTo(entranceLocation->Loc, TELE_TO_NOT_LEAVE_TRANSPORT);
else
- player->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, at->target_Orientation, TELE_TO_NOT_LEAVE_TRANSPORT);
+ player->TeleportTo(at->Loc, TELE_TO_NOT_LEAVE_TRANSPORT);
}
}