mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 15:33:59 +00:00
fix(Core/Misc): Fixed radius of areatriggers in battlegrounds. (#12017)
* fix(Core/Misc): Fixed radius of areatriggers in battlegrounds. Fixes #12004 * buildfix.
This commit is contained in:
@@ -731,7 +731,8 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!player->IsInAreaTriggerRadius(atEntry))
|
||||
bool isTavernAreatrigger = sObjectMgr->IsTavernAreaTrigger(triggerId);
|
||||
if (!player->IsInAreaTriggerRadius(atEntry, isTavernAreatrigger ? 5.f : 0.f))
|
||||
{
|
||||
LOG_DEBUG("network", "HandleAreaTriggerOpcode: Player {} ({}) too far (trigger map: {} player map: {}), ignore Area Trigger ID: {}",
|
||||
player->GetName(), player->GetGUID().ToString(), atEntry->map, player->GetMapId(), triggerId);
|
||||
@@ -749,7 +750,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
|
||||
if (player->GetQuestStatus(questId) == QUEST_STATUS_INCOMPLETE)
|
||||
player->AreaExploredOrEventHappens(questId);
|
||||
|
||||
if (sObjectMgr->IsTavernAreaTrigger(triggerId))
|
||||
if (isTavernAreatrigger)
|
||||
{
|
||||
// set resting flag we are in the inn
|
||||
player->SetRestFlag(REST_FLAG_IN_TAVERN, atEntry->entry);
|
||||
|
||||
Reference in New Issue
Block a user