1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 06:47:45 +00:00

Merge pull request #436 from NotAdam/housing

Fix ward info issue, some cleanup
This commit is contained in:
Mordred 2018-11-23 07:54:52 +01:00 committed by GitHub
commit e5d7ffdb77
4 changed files with 12 additions and 9 deletions

View file

@ -19,12 +19,6 @@ MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURR
ALTER TABLE charainfosearch
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE charaitemcrystal
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE charaitemcurrency
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE charaitemgearset
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;

View file

@ -240,8 +240,13 @@ void Core::HousingMgr::sendWardLandInfo( Entity::Player& player, uint8_t wardId,
auto& entry = wardInfoPacket->data().houseInfoEntry[ i ];
// retail always sends the house price in this packet, even after the house has been sold
// so I guess we do the same
entry.housePrice = land->getCurrentPrice();
if( land->getState() == Common::HouseState::forSale )
continue;
switch( land->getLandType() )
{
case LandType::FreeCompany:

View file

@ -410,14 +410,18 @@ bool Core::TerritoryMgr::movePlayer( ZonePtr pZone, Core::Entity::PlayerPtr pPla
if( isHousingTerritory( pZone->getTerritoryTypeId() ) )
{
auto pHousing = std::dynamic_pointer_cast< HousingZone >( pZone );
if( pHousing )
if( pHousing )
pPlayer->setTerritoryId( pHousing->getLandSetId() );
}
}
else if( isInstanceContentTerritory( pZone->getTerritoryTypeId() ) )
{
pPlayer->setTerritoryId( pZone->getGuId() );
}
else
{
pPlayer->setTerritoryId( 0 );
}
// mark character as zoning in progress
pPlayer->setLoadingComplete( false );