<commit_before>#include "PlayerMgr.h"

#include <Framework.h>
#include <Exd/ExdDataGenerated.h>

#include <Zone/TerritoryMgr.h>
#include <Zone/ZonePosition.h>

#include <Zone/HousingMgr.h>

#include <Actor/Player.h>

extern Core::Framework g_fw;

void Sapphire::World::Manager::PlayerMgr::movePlayerToLandDestination( Core::Entity::Player& player, uint32_t landId, uint16_t param )
{
  // check if we have one in the db first
  auto terriMgr = g_fw.get< Core::TerritoryMgr >();
  if( !terriMgr )
    return;

  Core::ZonePtr destinationZone;

  auto terriPos = terriMgr->getTerritoryPosition( landId );
  if( terriPos )
  {
    // check if its a housing zone, zoning is different here
    if( terriMgr->isHousingTerritory( terriPos->getTargetZoneId() ) && param != 0 )
    {
      auto housingMgr = g_fw.get< Core::HousingMgr >();
      auto landSetId = housingMgr->toLandSetId( terriPos->getTargetZoneId(), param );

      auto housingZone = housingMgr->getHousingZoneByLandSetId( landSetId );

      if( !housingZone )
        return;

      destinationZone = housingZone;
    }
    else if( terriMgr->isInstanceContentTerritory( terriPos->getTargetZoneId() ) )
    {
      // todo: instance dungeon handling
      // will need to use setInstance so old pos gets set
      return;
    }<commit_msg>Fix stupid mistake stopping ward 1 from working when zoning<commit_after>#include "PlayerMgr.h"

#include <Framework.h>
#include <Exd/ExdDataGenerated.h>

#include <Zone/TerritoryMgr.h>
#include <Zone/ZonePosition.h>

#include <Zone/HousingMgr.h>

#include <Actor/Player.h>

extern Core::Framework g_fw;

void Sapphire::World::Manager::PlayerMgr::movePlayerToLandDestination( Core::Entity::Player& player, uint32_t landId, uint16_t param )
{
  // check if we have one in the db first
  auto terriMgr = g_fw.get< Core::TerritoryMgr >();
  if( !terriMgr )
    return;

  Core::ZonePtr destinationZone;

  auto terriPos = terriMgr->getTerritoryPosition( landId );
  if( terriPos )
  {
    // check if its a housing zone, zoning is different here
    if( terriMgr->isHousingTerritory( terriPos->getTargetZoneId() ) )
    {
      auto housingMgr = g_fw.get< Core::HousingMgr >();
      auto landSetId = housingMgr->toLandSetId( terriPos->getTargetZoneId(), param );

      auto housingZone = housingMgr->getHousingZoneByLandSetId( landSetId );

      if( !housingZone )
        return;

      destinationZone = housingZone;
    }
    else if( terriMgr->isInstanceContentTerritory( terriPos->getTargetZoneId() ) )
    {
      // todo: instance dungeon handling
      // will need to use setInstance so old pos gets set
      return;
    }
{'fraction_non_alphanumeric': 0.11474164133738601, 'fraction_numerical': 0.003799392097264438, 'mean_word_length': 3.752707581227437, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2551585', 'n_tokens_mistral': 879, 'n_tokens_neox': 874, 'n_words': 209}