From 28211b2808aacb806f8b77c6f96240a7a0156083 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 02:08:28 +1100 Subject: [PATCH 01/86] add batch land select to get all land + houses in 1 query --- src/common/Database/ZoneDbConnection.cpp | 7 +++++++ src/common/Database/ZoneDbConnection.h | 1 + src/world/Territory/Land.cpp | 1 + 3 files changed, 9 insertions(+) diff --git a/src/common/Database/ZoneDbConnection.cpp b/src/common/Database/ZoneDbConnection.cpp index b35ecf79..2e96cd6a 100644 --- a/src/common/Database/ZoneDbConnection.cpp +++ b/src/common/Database/ZoneDbConnection.cpp @@ -212,6 +212,13 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements() "SELECT * FROM land WHERE LandSetId = ?;", CONNECTION_SYNC ); + prepareStatement( LAND_SEL_BATCH, + "SELECT land.*, house.Welcome, house.Aetheryte, house.Comment, house.HouseName, house.BuildTime, house.Endorsements" + "FROM land" + "LEFT JOIN house" + "ON land.HouseId = house.HouseId;", + CONNECTION_SYNC ); + /*prepareStatement( LAND_INS, "INSERT INTO land ( LandSetId ) VALUES ( ? );", CONNECTION_BOTH ); diff --git a/src/common/Database/ZoneDbConnection.h b/src/common/Database/ZoneDbConnection.h index 2cbfac6e..47bce834 100644 --- a/src/common/Database/ZoneDbConnection.h +++ b/src/common/Database/ZoneDbConnection.h @@ -80,6 +80,7 @@ namespace Sapphire::Db LAND_INS, LAND_SEL, + LAND_SEL_BATCH, LAND_UP, LANDSET_SEL, HOUSING_HOUSE_INS, diff --git a/src/world/Territory/Land.cpp b/src/world/Territory/Land.cpp index d575cfea..21ab6a00 100644 --- a/src/world/Territory/Land.cpp +++ b/src/world/Territory/Land.cpp @@ -139,6 +139,7 @@ void Sapphire::Land::loadItemContainerContents() items[ containerId ].push_back( std::make_pair( slotId, itemId ) ); } + // fuck the query off res.reset(); for( auto it = items.begin(); it != items.end(); it++ ) From ab35d2075dd79bf79f1949bda028d1565ba8dd94 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 11:33:21 +1100 Subject: [PATCH 02/86] cache all houses on startup --- src/common/Database/ZoneDbConnection.cpp | 8 +- src/common/Database/ZoneDbConnection.h | 2 +- src/world/Manager/HousingMgr.cpp | 78 ++++++++++++++++--- src/world/Manager/HousingMgr.h | 45 ++++++++++- .../Network/Handlers/ClientTriggerHandler.cpp | 2 +- src/world/ServerMgr.cpp | 6 ++ 6 files changed, 123 insertions(+), 18 deletions(-) diff --git a/src/common/Database/ZoneDbConnection.cpp b/src/common/Database/ZoneDbConnection.cpp index 2e96cd6a..e3beaaa5 100644 --- a/src/common/Database/ZoneDbConnection.cpp +++ b/src/common/Database/ZoneDbConnection.cpp @@ -212,10 +212,10 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements() "SELECT * FROM land WHERE LandSetId = ?;", CONNECTION_SYNC ); - prepareStatement( LAND_SEL_BATCH, - "SELECT land.*, house.Welcome, house.Aetheryte, house.Comment, house.HouseName, house.BuildTime, house.Endorsements" - "FROM land" - "LEFT JOIN house" + prepareStatement( LAND_SEL_ALL, + "SELECT land.*, house.Welcome, house.Aetheryte, house.Comment, house.HouseName, house.BuildTime, house.Endorsements " + "FROM land " + "LEFT JOIN house " "ON land.HouseId = house.HouseId;", CONNECTION_SYNC ); diff --git a/src/common/Database/ZoneDbConnection.h b/src/common/Database/ZoneDbConnection.h index 47bce834..179993d9 100644 --- a/src/common/Database/ZoneDbConnection.h +++ b/src/common/Database/ZoneDbConnection.h @@ -80,7 +80,7 @@ namespace Sapphire::Db LAND_INS, LAND_SEL, - LAND_SEL_BATCH, + LAND_SEL_ALL, LAND_UP, LANDSET_SEL, HOUSING_HOUSE_INS, diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 44846d0e..f5ef4403 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -33,18 +33,70 @@ using namespace Sapphire::Network::Packets::Server; extern Sapphire::Framework g_fw; -Sapphire::World::Manager::HousingMgr::HousingMgr() -{ - -} - -Sapphire::World::Manager::HousingMgr::~HousingMgr() -{ - -} +Sapphire::World::Manager::HousingMgr::HousingMgr() = default; +Sapphire::World::Manager::HousingMgr::~HousingMgr() = default; bool Sapphire::World::Manager::HousingMgr::init() { + auto log = g_fw.get< Sapphire::Logger >(); + + log->info( "HousingMgr: Caching housing land data" ); + //LAND_SEL_ALL + + // 18 wards per territory, 4 territories + m_landCache.reserve( 18 * 4 ); + + auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + + auto stmt = pDb->getPreparedStatement( Db::LAND_SEL_ALL ); + auto res = pDb->query( stmt ); + + while( res->next() ) + { + LandCacheEntry entry; + + // land stuff + entry.m_landSetId = res->getUInt64( "LandSetId" ); + entry.m_landId = res->getUInt64( "LandId" ); + + entry.m_type = res->getUInt8( "Type" ); + entry.m_size = res->getUInt8( "Size" ); + entry.m_status = res->getUInt8( "Status" ); + entry.m_landPrice = res->getUInt64( "LandPrice" ); + entry.m_updateTime = res->getUInt64( "UpdateTime" ); + entry.m_ownerId = res->getUInt64( "OwnerId" ); + + entry.m_houseId = res->getUInt64( "HouseId" ); + + // house stuff + + entry.m_estateWelcome = res->getString( "Welcome" ); + entry.m_estateComment = res->getString( "Comment" ); + entry.m_houseName = res->getString( "HouseName" ); + entry.m_buildTime = res->getUInt64( "BuildTime" ); + entry.m_endorsements = res->getUInt64( "Endorsements" ); + + m_landCache[ entry.m_landSetId ].push_back( entry ); + } + + log->info( "HousingMgr: Checking land counts" ); + + uint32_t houseCount = 0; + for( auto& landSet : m_landCache ) + { + auto count = landSet.second.size(); + + houseCount += count; + + if( landSet.second.size() != 60 ) + { + log->fatal( "LandSet " + std::to_string( landSet.first ) + " is missing entries. Only have " + std::to_string( count ) + " land entries." ); + return false; + } + } + + log->info( "HousingMgr: Cached " + std::to_string( houseCount ) + " houses" ); + return true; } @@ -472,7 +524,8 @@ Sapphire::Common::LandIdent Sapphire::World::Manager::HousingMgr::clientTriggerP return ident; } -void Sapphire::World::Manager::HousingMgr::sendHousingInventory( Entity::Player& player, uint16_t inventoryType, uint8_t plotNum ) +void Sapphire::World::Manager::HousingMgr::sendEstateInventory( Entity::Player& player, uint16_t inventoryType, + uint8_t plotNum ) { Sapphire::LandPtr targetLand; @@ -516,4 +569,9 @@ void Sapphire::World::Manager::HousingMgr::sendHousingInventory( Entity::Player& auto invMgr = g_fw.get< Manager::InventoryMgr >(); invMgr->sendInventoryContainer( player, container ); +} + +const Sapphire::World::Manager::HousingMgr::LandSetLandCacheMap& Sapphire::World::Manager::HousingMgr::getLandCacheMap() const +{ + return m_landCache; } \ No newline at end of file diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index b4334714..8716a3ba 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -17,6 +17,38 @@ namespace Sapphire::World::Manager { public: + + struct LandCacheEntry + { + // land table + uint64_t m_landSetId; + uint64_t m_landId; + + uint8_t m_type; + uint8_t m_size; + uint8_t m_status; + + uint64_t m_landPrice; + + uint64_t m_updateTime; + uint64_t m_ownerId; + uint64_t m_houseId; + + // house table + + std::string m_estateWelcome; + std::string m_estateComment; + std::string m_houseName; + + uint64_t m_buildTime; + uint64_t m_endorsements; + }; + + /*! + * @brief Maps land id to a list of cached entries + */ + using LandSetLandCacheMap = std::unordered_map< uint64_t, std::vector< LandCacheEntry > >; + HousingMgr(); virtual ~HousingMgr(); @@ -53,9 +85,18 @@ namespace Sapphire::World::Manager /*! * @brief Sends the house inventory for the specified type to a player. * - * This enforces permissions on the inventory too so random players can't request a houses items + * This enforces permissions on the inventory too so random players can't request an estates items */ - void sendHousingInventory( Entity::Player& player, uint16_t inventoryType, uint8_t plotNum ); + void sendEstateInventory( Entity::Player& player, uint16_t inventoryType, uint8_t plotNum ); + + /*! + * @brief Get the land & house data that was cached on world startup. + * @return + */ + const LandSetLandCacheMap& getLandCacheMap() const; + + private: + LandSetLandCacheMap m_landCache; }; diff --git a/src/world/Network/Handlers/ClientTriggerHandler.cpp b/src/world/Network/Handlers/ClientTriggerHandler.cpp index de7528c2..e61e168d 100644 --- a/src/world/Network/Handlers/ClientTriggerHandler.cpp +++ b/src/world/Network/Handlers/ClientTriggerHandler.cpp @@ -434,7 +434,7 @@ void Sapphire::Network::GameConnection::clientTriggerHandler( const Packets::FFX if( param2 == 1 ) inventoryType = Common::InventoryType::HousingOutdoorStoreroom; - housingMgr->sendHousingInventory( player, inventoryType, plot ); + housingMgr->sendEstateInventory( player, inventoryType, plot ); break; } diff --git a/src/world/ServerMgr.cpp b/src/world/ServerMgr.cpp index ec597356..842151d3 100644 --- a/src/world/ServerMgr.cpp +++ b/src/world/ServerMgr.cpp @@ -151,6 +151,12 @@ void Sapphire::ServerMgr::run( int32_t argc, char* argv[] ) auto pTeriMgr = std::make_shared< Manager::TerritoryMgr >(); auto pHousingMgr = std::make_shared< Manager::HousingMgr >(); g_fw.set< Manager::HousingMgr >( pHousingMgr ); + if( !pHousingMgr->init() ) + { + pLog->fatal( "Failed to setup housing!" ); + return; + } + g_fw.set< Manager::TerritoryMgr >( pTeriMgr ); if( !pTeriMgr->init() ) { From 8cd4b690a839eb82256a5b472b593e31b07b065a Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 12:00:03 +1100 Subject: [PATCH 03/86] init houses from land cache instead of territory based queries --- src/world/Manager/HousingMgr.cpp | 7 +++-- src/world/Manager/HousingMgr.h | 4 +-- src/world/Territory/HousingZone.cpp | 41 ++++++++++------------------- 3 files changed, 19 insertions(+), 33 deletions(-) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index f5ef4403..d38bd9e5 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -59,17 +59,16 @@ bool Sapphire::World::Manager::HousingMgr::init() entry.m_landSetId = res->getUInt64( "LandSetId" ); entry.m_landId = res->getUInt64( "LandId" ); - entry.m_type = res->getUInt8( "Type" ); + entry.m_type = static_cast< Common::LandType >( res->getUInt( "Type" ) ); entry.m_size = res->getUInt8( "Size" ); entry.m_status = res->getUInt8( "Status" ); - entry.m_landPrice = res->getUInt64( "LandPrice" ); + entry.m_currentPrice = res->getUInt64( "LandPrice" ); entry.m_updateTime = res->getUInt64( "UpdateTime" ); entry.m_ownerId = res->getUInt64( "OwnerId" ); entry.m_houseId = res->getUInt64( "HouseId" ); // house stuff - entry.m_estateWelcome = res->getString( "Welcome" ); entry.m_estateComment = res->getString( "Comment" ); entry.m_houseName = res->getString( "HouseName" ); @@ -90,7 +89,7 @@ bool Sapphire::World::Manager::HousingMgr::init() if( landSet.second.size() != 60 ) { - log->fatal( "LandSet " + std::to_string( landSet.first ) + " is missing entries. Only have " + std::to_string( count ) + " land entries." ); + log->fatal( "LandSet " + std::to_string( landSet.first ) + " is missing land entries. Only have " + std::to_string( count ) + " land entries." ); return false; } } diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index 8716a3ba..a221db71 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -24,11 +24,11 @@ namespace Sapphire::World::Manager uint64_t m_landSetId; uint64_t m_landId; - uint8_t m_type; + Common::LandType m_type; uint8_t m_size; uint8_t m_status; - uint64_t m_landPrice; + uint64_t m_currentPrice; uint64_t m_updateTime; uint64_t m_ownerId; diff --git a/src/world/Territory/HousingZone.cpp b/src/world/Territory/HousingZone.cpp index 17fdfd3b..761d556f 100644 --- a/src/world/Territory/HousingZone.cpp +++ b/src/world/Territory/HousingZone.cpp @@ -64,40 +64,27 @@ bool Sapphire::HousingZone::init() auto pExdData = g_fw.get< Data::ExdDataGenerated >(); auto info = pExdData->get< Sapphire::Data::HousingLandSet >( housingIndex ); - auto stmt = pDb->getPreparedStatement( Db::LANDSET_SEL ); - stmt->setUInt64( 1, m_landSetId ); - auto res = pDb->query( stmt ); + auto housingMgr = g_fw.get< World::Manager::HousingMgr >(); + auto landCache = housingMgr->getLandCacheMap(); - std::vector< QueuedLandInit > landInit; - - while( res->next() ) + // make sure the landset exists + auto landSetCache = landCache.find( m_landSetId ); + if( landSetCache == landCache.end() ) { - - QueuedLandInit init; - init.m_landId = res->getUInt64( "LandId" ); - init.m_type = static_cast< Common::LandType >( res->getUInt( "Type" ) ); - init.m_size = res->getUInt( "Size" ); - init.m_status = res->getUInt( "Status" ); - init.m_currentPrice = res->getUInt( "LandPrice" ); - init.m_ownerId = res->getUInt64( "OwnerId" ); - init.m_houseId = res->getUInt64( "HouseId" ); - - landInit.push_back( init ); + g_fw.get< Sapphire::Logger >()->fatal( "LandSet " + std::to_string( m_landSetId ) + " is missing from the land cache." ); + return false; } - // nuke current query connection so the queries still in land don't fail - res.reset(); - - // spawn land - for( auto& init : landInit ) + // init the lands + for( auto& entry : landSetCache->second ) { - auto land = make_Land( m_territoryTypeId, getWardNum(), init.m_landId, m_landSetId, info ); - land->init( init.m_type, init.m_size, init.m_status, init.m_currentPrice, init.m_ownerId, init.m_houseId ); + auto land = make_Land( m_territoryTypeId, getWardNum(), entry.m_landId, m_landSetId, info ); + land->init( entry.m_type, entry.m_size, entry.m_status, entry.m_currentPrice, entry.m_ownerId, entry.m_houseId ); - m_landPtrMap[ init.m_landId ] = land; + m_landPtrMap[ entry.m_landId ] = land; - if( init.m_houseId > 0 ) - registerHouseEntranceEObj( init.m_landId ); + if( entry.m_houseId > 0 ) + registerHouseEntranceEObj( entry.m_landId ); } return true; From 8b70f791089ad2274d7d2cefdf405a846418e4b4 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 14:35:42 +1100 Subject: [PATCH 04/86] fix house init, some refactoring and base inventory impl --- bin/config/config.ini.default | 6 +- src/common/Database/ZoneDbConnection.cpp | 5 +- src/world/Manager/HousingMgr.cpp | 91 ++++++++++++++------ src/world/Manager/HousingMgr.h | 34 +++++++- src/world/Territory/House.cpp | 105 ++++++++++++----------- src/world/Territory/House.h | 7 +- src/world/Territory/HousingZone.cpp | 11 ++- src/world/Territory/Land.cpp | 12 +-- src/world/Territory/Land.h | 1 + 9 files changed, 184 insertions(+), 88 deletions(-) diff --git a/bin/config/config.ini.default b/bin/config/config.ini.default index 4c11b849..cacd9115 100644 --- a/bin/config/config.ini.default +++ b/bin/config/config.ini.default @@ -55,4 +55,8 @@ ListenPort = 54992 [General] ; Sent on login - each line must be shorter than 307 characters, split lines with ';' -MotD = Welcome to Sapphire!;This is a very good server;You can change these messages by editing General.MotD in config/zone.ini \ No newline at end of file +MotD = Welcome to Sapphire!;This is a very good server;You can change these messages by editing General.MotD in config/config.ini + +[Housing] +; Set the default estate name. %i will be replaced with the plot number +DefaultEstateName = Estate #%i \ No newline at end of file diff --git a/src/common/Database/ZoneDbConnection.cpp b/src/common/Database/ZoneDbConnection.cpp index e3beaaa5..a5104467 100644 --- a/src/common/Database/ZoneDbConnection.cpp +++ b/src/common/Database/ZoneDbConnection.cpp @@ -201,7 +201,10 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements() CONNECTION_BOTH ); prepareStatement( LAND_INV_SEL_ALL, - "SELECT LandIdent, ContainerId, ItemId, SlotId FROM houseiteminventory;", + "SELECT houseiteminventory.*, charaglobalitem.catalogId, charaglobalitem.stain, charaglobalitem.CharacterId " + "FROM houseiteminventory " + "LEFT JOIN charaglobalitem " + "ON houseiteminventory.ItemId = charaglobalitem.itemId;", CONNECTION_BOTH ); prepareStatement( LAND_INV_SEL_HOUSE, diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index d38bd9e5..8d7c0b92 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -40,12 +40,51 @@ bool Sapphire::World::Manager::HousingMgr::init() { auto log = g_fw.get< Sapphire::Logger >(); - log->info( "HousingMgr: Caching housing land data" ); + log->info( "HousingMgr: Caching housing land init data" ); //LAND_SEL_ALL // 18 wards per territory, 4 territories m_landCache.reserve( 18 * 4 ); + loadLandCache(); + + log->info( "HousingMgr: Checking land counts" ); + + uint32_t houseCount = 0; + for( auto& landSet : m_landCache ) + { + auto count = landSet.second.size(); + + houseCount += count; + + if( landSet.second.size() != 60 ) + { + log->fatal( "LandSet " + std::to_string( landSet.first ) + " is missing land entries. Only have " + std::to_string( count ) + " land entries." ); + return false; + } + } + + log->info( "HousingMgr: Cached " + std::to_string( houseCount ) + " houses" ); + + ///// + + if( !loadEstateInventories() ) + return false; + + return true; +} + +bool Sapphire::World::Manager::HousingMgr::loadEstateInventories() +{ + auto log = g_fw.get< Sapphire::Logger >(); + + log->info( "HousingMgr: Loading inventories for estates" ); + + return true; +} + +void Sapphire::World::Manager::HousingMgr::loadLandCache() +{ auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); auto stmt = pDb->getPreparedStatement( Db::LAND_SEL_ALL ); @@ -71,33 +110,12 @@ bool Sapphire::World::Manager::HousingMgr::init() // house stuff entry.m_estateWelcome = res->getString( "Welcome" ); entry.m_estateComment = res->getString( "Comment" ); - entry.m_houseName = res->getString( "HouseName" ); + entry.m_estateName = res->getString( "HouseName" ); entry.m_buildTime = res->getUInt64( "BuildTime" ); entry.m_endorsements = res->getUInt64( "Endorsements" ); m_landCache[ entry.m_landSetId ].push_back( entry ); } - - log->info( "HousingMgr: Checking land counts" ); - - uint32_t houseCount = 0; - for( auto& landSet : m_landCache ) - { - auto count = landSet.second.size(); - - houseCount += count; - - if( landSet.second.size() != 60 ) - { - log->fatal( "LandSet " + std::to_string( landSet.first ) + " is missing land entries. Only have " + std::to_string( count ) + " land entries." ); - return false; - } - } - - log->info( "HousingMgr: Cached " + std::to_string( houseCount ) + " houses" ); - - - return true; } uint32_t Sapphire::World::Manager::HousingMgr::toLandSetId( uint16_t territoryTypeId, uint8_t wardId ) const @@ -570,7 +588,32 @@ void Sapphire::World::Manager::HousingMgr::sendEstateInventory( Entity::Player& invMgr->sendInventoryContainer( player, container ); } -const Sapphire::World::Manager::HousingMgr::LandSetLandCacheMap& Sapphire::World::Manager::HousingMgr::getLandCacheMap() const +const Sapphire::World::Manager::HousingMgr::LandSetLandCacheMap& + Sapphire::World::Manager::HousingMgr::getLandCacheMap() const { return m_landCache; +} + +Sapphire::World::Manager::HousingMgr::LandIdentToInventoryContainerMap + Sapphire::World::Manager::HousingMgr::getEstateInventories() const +{ + return m_estateInventories; +} + +Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap + Sapphire::World::Manager::HousingMgr::getEstateInventory( uint64_t ident ) const +{ + auto map = m_estateInventories.find( ident ); + + assert( map != m_estateInventories.end() ); + + return map->second; +} + +Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap + Sapphire::World::Manager::HousingMgr::getEstateInventory( Sapphire::Common::LandIdent ident ) const +{ + auto u64ident = *reinterpret_cast< uint64_t* >( &ident ); + + getEstateInventory( u64ident ); } \ No newline at end of file diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index a221db71..2f92d10e 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -38,7 +38,7 @@ namespace Sapphire::World::Manager std::string m_estateWelcome; std::string m_estateComment; - std::string m_houseName; + std::string m_estateName; uint64_t m_buildTime; uint64_t m_endorsements; @@ -49,6 +49,15 @@ namespace Sapphire::World::Manager */ using LandSetLandCacheMap = std::unordered_map< uint64_t, std::vector< LandCacheEntry > >; + /*! + * @brief Maps container IDs to their relevant ItemContainerPtr + */ + using ContainerIdToContainerMap = std::unordered_map< uint16_t, ItemContainerPtr >; + /*! + * @brief Maps land idents to a container containing ItemContainerPtrs + */ + using LandIdentToInventoryContainerMap = std::unordered_map< uint64_t, ContainerIdToContainerMap >; + HousingMgr(); virtual ~HousingMgr(); @@ -95,8 +104,31 @@ namespace Sapphire::World::Manager */ const LandSetLandCacheMap& getLandCacheMap() const; + /*! + * @brief Get all loaded inventories for housing estates + * @return + */ + LandIdentToInventoryContainerMap getEstateInventories() const; + + /*! + * @brief Get an estate inventory for a specific estate + * @param ident LandIdent for the specified estate + * @return A map containing container ids to ItemContainerPtr + */ + ContainerIdToContainerMap getEstateInventory( uint64_t ident ) const; + + /*! + * @brief Get an estate inventory for a specific estate + * @param ident LandIdent for the specified estate + * @return A map containing container ids to ItemContainerPtr + */ + ContainerIdToContainerMap getEstateInventory( Common::LandIdent ident ) const; private: + void loadLandCache(); + bool loadEstateInventories(); + LandSetLandCacheMap m_landCache; + LandIdentToInventoryContainerMap m_estateInventories; }; diff --git a/src/world/Territory/House.cpp b/src/world/Territory/House.cpp index 820a7b1e..9979e501 100644 --- a/src/world/Territory/House.cpp +++ b/src/world/Territory/House.cpp @@ -13,57 +13,58 @@ extern Sapphire::Framework g_fw; -Sapphire::House::House( uint32_t houseId, uint32_t landSetId, Common::LandIdent ident ) : +Sapphire::House::House( uint32_t houseId, uint32_t landSetId, Common::LandIdent ident, const std::string& estateName, + const std::string& estateComment ) : m_houseId( houseId ), m_landSetId( landSetId ), - m_landIdent( ident ) + m_landIdent( ident ), + m_estateName( estateName ), + m_estateComment( estateComment ) { - auto pDB = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); - - // todo: convert to prepared statement - auto res = pDB->query( "SELECT * FROM house WHERE HouseId = " + std::to_string( houseId ) ); - - if( !res->next() ) - { - g_fw.get< Sapphire::Logger >()->info( "Creating house House#" + std::to_string( houseId ) + " in LandSet#" + std::to_string( landSetId ) ); - - auto stmt = pDB->getPreparedStatement( Db::HOUSING_HOUSE_INS ); - - stmt->setUInt( 1, m_landSetId ); - stmt->setUInt( 2, m_houseId ); - - pDB->execute( stmt ); - - // todo: make this nicer/configurable? - m_houseName = "Estate #" + std::to_string( m_landIdent.landId + 1 ); - } - else - { - m_estateMessage = res->getString( "Comment" ); - m_houseName = res->getString( "HouseName" ); - - auto housePartModels = res->getBlobVector( "HousePartModels" ); - auto housePartColours = res->getBlobVector( "HousePartColours" ); - - auto models = reinterpret_cast< uint32_t* >( &housePartModels[ 0 ] ); - for( auto i = 0; i < 8; i++ ) - { - m_houseParts[ i ] = { models[ i ], housePartColours[ i ] }; - } - - auto houseInteriorModels = res->getBlobVector( "HouseInteriorModels" ); - - auto interiorModels = reinterpret_cast< uint32_t* >( &houseInteriorModels[ 0 ] ); - for( auto i = 0; i < 10; i++ ) - { - m_houseInteriorParts[ i ] = interiorModels[ i ]; - } - } +// auto pDB = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); +// +// // todo: convert to prepared statement +// auto res = pDB->query( "SELECT * FROM house WHERE HouseId = " + std::to_string( houseId ) ); +// +// if( !res->next() ) +// { +// g_fw.get< Sapphire::Logger >()->info( "Creating house House#" + std::to_string( houseId ) + " in LandSet#" + std::to_string( landSetId ) ); +// +// auto stmt = pDB->getPreparedStatement( Db::HOUSING_HOUSE_INS ); +// +// stmt->setUInt( 1, m_landSetId ); +// stmt->setUInt( 2, m_houseId ); +// +// pDB->execute( stmt ); +// +// // todo: make this nicer/configurable? +// m_estateName = "Estate #" + std::to_string( m_landIdent.landId + 1 ); +// } +// else +// { +// m_estateComment = res->getString( "Comment" ); +// m_estateName = res->getString( "HouseName" ); +// +// auto housePartModels = res->getBlobVector( "HousePartModels" ); +// auto housePartColours = res->getBlobVector( "HousePartColours" ); +// +// auto models = reinterpret_cast< uint32_t* >( &housePartModels[ 0 ] ); +// for( auto i = 0; i < 8; i++ ) +// { +// m_houseParts[ i ] = { models[ i ], housePartColours[ i ] }; +// } +// +// auto houseInteriorModels = res->getBlobVector( "HouseInteriorModels" ); +// +// auto interiorModels = reinterpret_cast< uint32_t* >( &houseInteriorModels[ 0 ] ); +// for( auto i = 0; i < 10; i++ ) +// { +// m_houseInteriorParts[ i ] = interiorModels[ i ]; +// } +// } } -Sapphire::House::~House() -{ -} +Sapphire::House::~House() = default; void Sapphire::House::updateHouseDb() { @@ -77,8 +78,8 @@ void Sapphire::House::updateHouseDb() stmt->setInt64( 1, m_buildTime ); stmt->setInt( 2, 0 ); - stmt->setString( 3, m_estateMessage ); - stmt->setString( 4, m_houseName ); + stmt->setString( 3, m_estateComment ); + stmt->setString( 4, m_estateName ); stmt->setUInt64( 5, 0 ); @@ -166,24 +167,24 @@ Sapphire::House::HousePartsArray const& Sapphire::House::getHouseParts() const const std::string& Sapphire::House::getHouseName() const { - return m_houseName; + return m_estateName; } const std::string& Sapphire::House::getHouseGreeting() const { - return m_estateMessage; + return m_estateComment; } void Sapphire::House::setHouseGreeting( const std::string& greeting ) { - m_estateMessage = greeting; + m_estateComment = greeting; updateHouseDb(); } void Sapphire::House::setHouseName( const std::string& name ) { - m_houseName = name; + m_estateName = name; updateHouseDb(); } \ No newline at end of file diff --git a/src/world/Territory/House.h b/src/world/Territory/House.h index f228874b..22726633 100644 --- a/src/world/Territory/House.h +++ b/src/world/Territory/House.h @@ -12,7 +12,8 @@ namespace Sapphire class House { public: - House( uint32_t houseId, uint32_t landSetId, Common::LandIdent ident ); + House( uint32_t houseId, uint32_t landSetId, Common::LandIdent ident, const std::string& estateName, + const std::string& estateComment ); virtual ~House(); using HousePart = std::pair< uint32_t, uint8_t >; @@ -51,8 +52,8 @@ namespace Sapphire HousePartsArray m_houseParts; uint32_t m_houseInteriorParts[10]; - std::string m_estateMessage; - std::string m_houseName; + std::string m_estateComment; + std::string m_estateName; }; } diff --git a/src/world/Territory/HousingZone.cpp b/src/world/Territory/HousingZone.cpp index 761d556f..ec485c72 100644 --- a/src/world/Territory/HousingZone.cpp +++ b/src/world/Territory/HousingZone.cpp @@ -76,9 +76,18 @@ bool Sapphire::HousingZone::init() } // init the lands - for( auto& entry : landSetCache->second ) + for( HousingMgr::LandCacheEntry& entry : landSetCache->second ) { auto land = make_Land( m_territoryTypeId, getWardNum(), entry.m_landId, m_landSetId, info ); + + // setup house + if( entry.m_houseId ) + { + //uint32_t houseId, uint32_t landSetId, Common::LandIdent ident, const std::string& estateName, + // const std::string& estateMessage + auto house = make_House( entry.m_houseId, m_landSetId, land->getLandIdent(), entry.m_estateName, entry.m_estateComment ); + } + land->init( entry.m_type, entry.m_size, entry.m_status, entry.m_currentPrice, entry.m_ownerId, entry.m_houseId ); m_landPtrMap[ entry.m_landId ] = land; diff --git a/src/world/Territory/Land.cpp b/src/world/Territory/Land.cpp index 21ab6a00..019165a2 100644 --- a/src/world/Territory/Land.cpp +++ b/src/world/Territory/Land.cpp @@ -62,10 +62,6 @@ void Sapphire::Land::init( Common::LandType type, uint8_t size, uint8_t state, u m_currentPrice = currentPrice; m_ownerId = ownerId; - // fetch the house if we have one for this land - if( houseId > 0 ) - m_pHouse = make_House( houseId, m_landSetId, getLandIdent() ); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); auto info = pExdData->get< Sapphire::Data::HousingMapMarkerInfo >( m_landIdent.territoryTypeId, m_landIdent.landId ); if( info ) @@ -224,6 +220,11 @@ Sapphire::HousePtr Sapphire::Land::getHouse() const return m_pHouse; } +void Sapphire::Land::setHouse( Sapphire::HousePtr house ) +{ + m_pHouse = house; +} + FFXIVARR_POSITION3 Sapphire::Land::getMapMarkerPosition() { return m_mapMarkerPosition; @@ -350,7 +351,8 @@ bool Sapphire::Land::setPreset( uint32_t itemId ) { // todo: i guess we'd create a house here? auto newId = getNextHouseId(); - m_pHouse = make_House( newId, getLandSetId(), getLandIdent() ); + + m_pHouse = make_House( newId, getLandSetId(), getLandIdent(), "Estate #" + std::to_string( m_landIdent.landId + 1 ), "" ); } diff --git a/src/world/Territory/Land.h b/src/world/Territory/Land.h index bf8a834c..c47bf3bb 100644 --- a/src/world/Territory/Land.h +++ b/src/world/Territory/Land.h @@ -33,6 +33,7 @@ namespace Sapphire uint8_t getSharing() const; uint32_t getLandSetId() const; Common::LandType getLandType() const; + void setHouse( Sapphire::HousePtr ); Sapphire::HousePtr getHouse() const; Common::FFXIVARR_POSITION3 getMapMarkerPosition(); Common::LandIdent getLandIdent() const; From e52127fd91af291afd5775c62bf3d0df074c4f39 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 15:58:54 +1100 Subject: [PATCH 05/86] load housing invs correctly --- src/world/Manager/HousingMgr.cpp | 48 +++++++++++++++- src/world/Territory/House.cpp | 24 ++++---- src/world/Territory/House.h | 8 +-- src/world/Territory/HousingZone.cpp | 28 +++++----- src/world/Territory/Land.cpp | 86 ++++++----------------------- src/world/Territory/Land.h | 4 -- 6 files changed, 93 insertions(+), 105 deletions(-) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 8d7c0b92..a4bc4a1b 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -25,6 +25,8 @@ #include "ServerMgr.h" #include "Territory/House.h" #include "InventoryMgr.h" +#include "Inventory/Item.h" +#include "Inventory/ItemContainer.h" using namespace Sapphire::Common; using namespace Sapphire::Network; @@ -48,7 +50,7 @@ bool Sapphire::World::Manager::HousingMgr::init() loadLandCache(); - log->info( "HousingMgr: Checking land counts" ); + log->debug( "HousingMgr: Checking land counts" ); uint32_t houseCount = 0; for( auto& landSet : m_landCache ) @@ -80,6 +82,48 @@ bool Sapphire::World::Manager::HousingMgr::loadEstateInventories() log->info( "HousingMgr: Loading inventories for estates" ); + auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + + auto stmt = pDb->getPreparedStatement( Db::LAND_INV_SEL_ALL ); + auto res = pDb->query( stmt ); + + uint32_t itemCount = 0; + while( res->next() ) + { + //uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, bool isHq + uint64_t ident = res->getUInt64( "LandIdent" ); + uint16_t containerId = res->getUInt16( "ContainerId" ); + uint64_t itemId = res->getUInt64( "ItemId" ); + uint16_t slot = res->getUInt16( "SlotId" ); + uint32_t catalogId = res->getUInt( "catalogId" ); + uint8_t stain = res->getUInt8( "stain" ); + uint64_t characterId = res->getUInt64( "CharacterId" ); + + auto item = make_Item( itemId, catalogId, 0, 0, 0 ); + item->setStain( stain ); + // todo: need to set the owner character id on the item + + ContainerIdToContainerMap estateInv = m_estateInventories[ ident ]; + + // check if containerId exists + auto container = estateInv.find( containerId ); + if( container == estateInv.end() ) + { + // create container + // todo: how to handle this max slot stuff? override it on land init? + auto ic = make_ItemContainer( containerId, 400, "houseiteminventory", true ); + ic->setItem( slot, item ); + + estateInv[ containerId ] = ic; + } + else + container->second->setItem( slot, item ); + + itemCount++; + } + + log->debug( "HousingMgr: Loaded " + std::to_string( itemCount ) + " inventory items" ); + return true; } @@ -580,7 +624,7 @@ void Sapphire::World::Manager::HousingMgr::sendEstateInventory( Entity::Player& if( targetLand->getOwnerId() != player.getId() ) return; - auto container = targetLand->getItemContainer( inventoryType ); + auto container = getEstateInventory( targetLand->getLandIdent() )[ inventoryType ]; if( !container ) return; diff --git a/src/world/Territory/House.cpp b/src/world/Territory/House.cpp index 9979e501..b4be2e63 100644 --- a/src/world/Territory/House.cpp +++ b/src/world/Territory/House.cpp @@ -51,7 +51,7 @@ Sapphire::House::House( uint32_t houseId, uint32_t landSetId, Common::LandIdent // auto models = reinterpret_cast< uint32_t* >( &housePartModels[ 0 ] ); // for( auto i = 0; i < 8; i++ ) // { -// m_houseParts[ i ] = { models[ i ], housePartColours[ i ] }; +// m_houseModelsCache[ i ] = { models[ i ], housePartColours[ i ] }; // } // // auto houseInteriorModels = res->getBlobVector( "HouseInteriorModels" ); @@ -59,7 +59,7 @@ Sapphire::House::House( uint32_t houseId, uint32_t landSetId, Common::LandIdent // auto interiorModels = reinterpret_cast< uint32_t* >( &houseInteriorModels[ 0 ] ); // for( auto i = 0; i < 10; i++ ) // { -// m_houseInteriorParts[ i ] = interiorModels[ i ]; +// m_houseInteriorModels[ i ] = interiorModels[ i ]; // } // } } @@ -88,7 +88,7 @@ void Sapphire::House::updateHouseDb() for( auto i = 0; i < 8; i++ ) { - auto& part = m_houseParts[ i ]; + auto& part = m_houseModelsCache[ i ]; models.push_back( part.first ); colours.push_back( part.second ); } @@ -104,7 +104,7 @@ void Sapphire::House::updateHouseDb() for( auto i = 0; i < 10; i++ ) { - models.push_back( m_houseInteriorParts[ i ] ); + models.push_back( m_houseInteriorModels[ i ] ); } std::vector< uint8_t > tmp2Models( models.size() * 4 ); @@ -132,37 +132,37 @@ uint32_t Sapphire::House::getHouseId() const uint8_t Sapphire::House::getHousePartColor( Common::HousePartSlot slot ) const { - return m_houseParts[ slot ].second; + return m_houseModelsCache[ slot ].second; } uint32_t Sapphire::House::getHouseInteriorPart( Common::HousingInteriorSlot slot ) const { - return m_houseInteriorParts[ slot ]; + return m_houseInteriorModels[ slot ]; } void Sapphire::House::setHousePart( Common::HousePartSlot slot, uint32_t id ) { - m_houseParts[ slot ].first = id; + m_houseModelsCache[ slot ].first = id; } void Sapphire::House::setHousePartColor( Common::HousePartSlot slot, uint32_t id ) { - m_houseParts[ slot ].second = id; + m_houseModelsCache[ slot ].second = id; } void Sapphire::House::setHouseInteriorPart( Common::HousingInteriorSlot slot, uint32_t id ) { - m_houseInteriorParts[ slot ] = id; + m_houseInteriorModels[ slot ] = id; } uint32_t Sapphire::House::getHousePart( Common::HousePartSlot slot ) const { - return m_houseParts[ slot ].first; + return m_houseModelsCache[ slot ].first; } -Sapphire::House::HousePartsArray const& Sapphire::House::getHouseParts() const +Sapphire::House::HouseModelsArray const& Sapphire::House::getHouseModels() const { - return m_houseParts; + return m_houseModelsCache; } const std::string& Sapphire::House::getHouseName() const diff --git a/src/world/Territory/House.h b/src/world/Territory/House.h index 22726633..f4c71817 100644 --- a/src/world/Territory/House.h +++ b/src/world/Territory/House.h @@ -17,7 +17,7 @@ namespace Sapphire virtual ~House(); using HousePart = std::pair< uint32_t, uint8_t >; - using HousePartsArray = std::array< HousePart, 8 >; + using HouseModelsArray = std::array< HousePart, 8 >; //gerneral uint32_t getLandSetId() const; @@ -38,7 +38,7 @@ namespace Sapphire uint8_t getHousePartColor( Common::HousePartSlot slot ) const; uint32_t getHouseInteriorPart( Common::HousingInteriorSlot slot ) const; - HousePartsArray const& getHouseParts() const; + HouseModelsArray const& getHouseModels() const; void updateHouseDb(); @@ -49,8 +49,8 @@ namespace Sapphire uint64_t m_buildTime; - HousePartsArray m_houseParts; - uint32_t m_houseInteriorParts[10]; + HouseModelsArray m_houseModelsCache; + uint32_t m_houseInteriorModels[10]; std::string m_estateComment; std::string m_estateName; diff --git a/src/world/Territory/HousingZone.cpp b/src/world/Territory/HousingZone.cpp index ec485c72..292344b4 100644 --- a/src/world/Territory/HousingZone.cpp +++ b/src/world/Territory/HousingZone.cpp @@ -83,9 +83,9 @@ bool Sapphire::HousingZone::init() // setup house if( entry.m_houseId ) { - //uint32_t houseId, uint32_t landSetId, Common::LandIdent ident, const std::string& estateName, - // const std::string& estateMessage auto house = make_House( entry.m_houseId, m_landSetId, land->getLandIdent(), entry.m_estateName, entry.m_estateComment ); + + land->setHouse( house ); } land->init( entry.m_type, entry.m_size, entry.m_status, entry.m_currentPrice, entry.m_ownerId, entry.m_houseId ); @@ -115,20 +115,20 @@ void Sapphire::HousingZone::onPlayerZoneIn( Entity::Player& player ) for( yardPacketNum = 0; yardPacketNum < yardPacketTotal; yardPacketNum++ ) { - auto housingObjectInitializPacket = makeZonePacket< FFXIVIpcHousingObjectInitialize >( player.getId() ); - memset( &housingObjectInitializPacket->data().landIdent, 0xFF, sizeof( Common::LandIdent ) ); - housingObjectInitializPacket->data().u1 = 0xFF; - housingObjectInitializPacket->data().packetNum = yardPacketNum; - housingObjectInitializPacket->data().packetTotal = yardPacketTotal; + auto housingObjectInit = makeZonePacket< FFXIVIpcHousingObjectInitialize >( player.getId() ); + memset( &housingObjectInit->data().landIdent, 0xFF, sizeof( Common::LandIdent ) ); + housingObjectInit->data().u1 = 0xFF; + housingObjectInit->data().packetNum = yardPacketNum; + housingObjectInit->data().packetTotal = yardPacketTotal; //TODO: Add Objects here - player.queuePacket( housingObjectInitializPacket ); + player.queuePacket( housingObjectInit ); } auto landSetMap = makeZonePacket< FFXIVIpcLandSetMap >( player.getId() ); - landSetMap->data().subdivision = isPlayerSubInstance( player ) == false ? 2 : 1; - uint8_t startIndex = isPlayerSubInstance( player ) == false ? 0 : 30; + landSetMap->data().subdivision = !isPlayerSubInstance( player ) ? 2 : 1; + uint8_t startIndex = !isPlayerSubInstance( player ) ? 0 : 30; for( uint8_t i = startIndex, count = 0; i < ( startIndex + 30 ); i++, count++ ) { landSetMap->data().landInfo[ count ].status = 1; @@ -147,9 +147,9 @@ void Sapphire::HousingZone::sendLandSet( Entity::Player& player ) landsetInitializePacket->data().landIdent.territoryTypeId = m_territoryTypeId; //TODO: get current WorldId landsetInitializePacket->data().landIdent.worldId = 67; - landsetInitializePacket->data().subInstance = isPlayerSubInstance( player ) == false ? 1 : 2; + landsetInitializePacket->data().subInstance = !isPlayerSubInstance( player ) ? 1 : 2; - uint8_t startIndex = isPlayerSubInstance( player ) == false ? 0 : 30; + uint8_t startIndex = !isPlayerSubInstance( player ) ? 0 : 30; for( uint8_t i = startIndex, count = 0; i < ( startIndex + 30 ); ++i, ++count ) { @@ -169,7 +169,7 @@ void Sapphire::HousingZone::sendLandSet( Entity::Player& player ) { landData.flags = 1; - auto& parts = house->getHouseParts(); + auto& parts = house->getHouseModels(); for( auto i = 0; i != parts.size(); i++ ) { @@ -206,7 +206,7 @@ void Sapphire::HousingZone::sendLandUpdate( uint8_t landId ) { landData.flags = 1; - auto& parts = house->getHouseParts(); + auto& parts = house->getHouseModels(); for( auto i = 0; i != parts.size(); i++ ) { diff --git a/src/world/Territory/Land.cpp b/src/world/Territory/Land.cpp index 019165a2..4a1d075a 100644 --- a/src/world/Territory/Land.cpp +++ b/src/world/Territory/Land.cpp @@ -90,66 +90,23 @@ void Sapphire::Land::init( Common::LandType type, uint8_t size, uint8_t state, u } // init item containers - auto setupContainer = [ this ]( InventoryType type, uint16_t maxSize ) - { - m_landInventoryMap[ type ] = make_ItemContainer( type, maxSize, "houseiteminventory", true, true ); - }; - - setupContainer( InventoryType::HousingOutdoorAppearance, 8 ); - setupContainer( InventoryType::HousingOutdoorPlacedItems, m_maxPlacedExternalItems ); - setupContainer( InventoryType::HousingOutdoorStoreroom, m_maxPlacedExternalItems ); - - setupContainer( InventoryType::HousingInteriorAppearance, 9 ); - - // nb: so we're going to store these internally in one container because SE is fucked in the head - // but when an inventory is requested, we will split them into groups of 50 - setupContainer( InventoryType::HousingInteriorPlacedItems1, m_maxPlacedInternalItems ); - setupContainer( InventoryType::HousingInteriorStoreroom1, m_maxPlacedInternalItems ); - - loadItemContainerContents(); -} - -void Sapphire::Land::loadItemContainerContents() -{ - if( !m_pHouse ) - return; - - auto ident = *reinterpret_cast< uint64_t* >( &m_landIdent ); - g_fw.get< Sapphire::Logger >()->debug( "Loading housing inventory for ident: " + std::to_string( ident ) ); - - auto pDB = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); - - auto stmt = pDB->getPreparedStatement( Db::LAND_INV_SEL_HOUSE ); - stmt->setUInt64( 1, ident ); - - auto res = pDB->query( stmt ); - - std::unordered_map< uint16_t, std::vector< std::pair< uint16_t, uint32_t > > > items; - - while( res->next() ) - { - auto containerId = res->getUInt( "ContainerId" ); - auto itemId = res->getUInt64( "ItemId" ); - auto slotId = res->getUInt( "SlotId" ); - - items[ containerId ].push_back( std::make_pair( slotId, itemId ) ); - } - - // fuck the query off - res.reset(); - - for( auto it = items.begin(); it != items.end(); it++ ) - { - auto container = m_landInventoryMap[ it->first ]; - - // todo: delet this - for( auto fuck = it->second.begin(); fuck != it->second.end(); fuck++ ) - { - auto item = Sapphire::Items::Util::loadItem( fuck->second ); - if( item ) - container->setItem( fuck->first, item ); - } - } +// auto setupContainer = [ this ]( InventoryType type, uint16_t maxSize ) +// { +// m_landInventoryMap[ type ] = make_ItemContainer( type, maxSize, "houseiteminventory", true, true ); +// }; +// +// setupContainer( InventoryType::HousingOutdoorAppearance, 8 ); +// setupContainer( InventoryType::HousingOutdoorPlacedItems, m_maxPlacedExternalItems ); +// setupContainer( InventoryType::HousingOutdoorStoreroom, m_maxPlacedExternalItems ); +// +// setupContainer( InventoryType::HousingInteriorAppearance, 9 ); +// +// // nb: so we're going to store these internally in one container because SE is fucked in the head +// // but when an inventory is requested, we will split them into groups of 50 +// setupContainer( InventoryType::HousingInteriorPlacedItems1, m_maxPlacedInternalItems ); +// setupContainer( InventoryType::HousingInteriorStoreroom1, m_maxPlacedInternalItems ); +// +// loadItemContainerContents(); } uint32_t Sapphire::Land::convertItemIdToHousingItemId( uint32_t itemId ) @@ -374,13 +331,4 @@ bool Sapphire::Land::setPreset( uint32_t itemId ) return true; -} - -Sapphire::ItemContainerPtr Sapphire::Land::getItemContainer( uint16_t inventoryType ) const -{ - auto container = m_landInventoryMap.find( inventoryType ); - if( container == m_landInventoryMap.end() ) - return nullptr; - - return container->second; } \ No newline at end of file diff --git a/src/world/Territory/Land.h b/src/world/Territory/Land.h index c47bf3bb..19977e77 100644 --- a/src/world/Territory/Land.h +++ b/src/world/Territory/Land.h @@ -61,9 +61,6 @@ namespace Sapphire void setLandTag( uint8_t slot, uint8_t tag ); uint8_t getLandTag( uint8_t slot ); - ItemContainerPtr getItemContainer( uint16_t inventoryType ) const; - void loadItemContainerContents(); - private: uint32_t convertItemIdToHousingItemId( uint32_t itemId ); uint32_t getNextHouseId(); @@ -87,7 +84,6 @@ namespace Sapphire Sapphire::HousePtr m_pHouse; //item storage - LandInventoryMap m_landInventoryMap; uint16_t m_maxPlacedExternalItems; uint16_t m_maxPlacedInternalItems; From c75abab4e68b47d2ed45979f4e1f251a4e84ea1f Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 16:00:04 +1100 Subject: [PATCH 06/86] remove old land init struct --- src/world/Territory/HousingZone.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/world/Territory/HousingZone.h b/src/world/Territory/HousingZone.h index 63fcfb4b..3868f31a 100644 --- a/src/world/Territory/HousingZone.h +++ b/src/world/Territory/HousingZone.h @@ -53,17 +53,6 @@ namespace Sapphire Entity::EventObjectPtr registerHouseEntranceEObj( uint8_t plotId ); private: - struct QueuedLandInit - { - uint64_t m_landId; - Common::LandType m_type; - uint8_t m_size; - uint8_t m_status; - uint32_t m_currentPrice; - uint64_t m_ownerId; - uint64_t m_houseId; - }; - using LandPtrMap = std::unordered_map< uint8_t, Sapphire::LandPtr >; const uint32_t m_landSetMax = 18; LandPtrMap m_landPtrMap; From ca62581dfbc328c0005e0f69fdd9e9fefb12519e Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 17:22:24 +1100 Subject: [PATCH 07/86] partially fix inventory loading fuckery --- src/world/Manager/HousingMgr.cpp | 34 ++++++++++++++++++++++++++++- src/world/Manager/HousingMgr.h | 8 +++++++ src/world/Territory/HousingZone.cpp | 1 + 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index a4bc4a1b..becad6ed 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -103,7 +103,7 @@ bool Sapphire::World::Manager::HousingMgr::loadEstateInventories() item->setStain( stain ); // todo: need to set the owner character id on the item - ContainerIdToContainerMap estateInv = m_estateInventories[ ident ]; + ContainerIdToContainerMap& estateInv = m_estateInventories[ ident ]; // check if containerId exists auto container = estateInv.find( containerId ); @@ -660,4 +660,36 @@ Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap auto u64ident = *reinterpret_cast< uint64_t* >( &ident ); getEstateInventory( u64ident ); +} + +void Sapphire::World::Manager::HousingMgr::updateHouseModels( Sapphire::HousePtr house ) +{ + assert( house ); + + auto getItemData = []( uint32_t itemId ) + { + auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto info = pExdData->get< Sapphire::Data::Item >( itemId ); + return info->additionalData; + }; + + auto containers = getEstateInventory( house->getLandIdent() ); + + auto extContainer = containers.find( static_cast< uint16_t >( InventoryType::HousingOutdoorAppearance ) ); + if( extContainer != containers.end() ) + { + for( auto& item : extContainer->second->getItemMap() ) + { + house->setHousePart( static_cast< Common::HousePartSlot >( item.first ), getItemData( item.second->getId() ) ); + } + } + + auto intContainer = containers.find( static_cast< uint16_t >( InventoryType::HousingInteriorAppearance ) ); + if( intContainer != containers.end() ) + { + for( auto& item : intContainer->second->getItemMap() ) + { + house->setHouseInteriorPart( static_cast< Common::HousingInteriorSlot >( item.first ), getItemData( item.second->getId() ) ); + } + } } \ No newline at end of file diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index 2f92d10e..3609c173 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -91,6 +91,14 @@ namespace Sapphire::World::Manager void sendEstateGreeting( Entity::Player& player, const Common::LandIdent ident ); + /*! + * @brief Updates the cached models on a house from the relevant apperance inventories. + * Does not send the subsequent update to clients. + * + * @param house The house to update the models for + */ + void updateHouseModels( HousePtr house ); + /*! * @brief Sends the house inventory for the specified type to a player. * diff --git a/src/world/Territory/HousingZone.cpp b/src/world/Territory/HousingZone.cpp index 292344b4..075059e2 100644 --- a/src/world/Territory/HousingZone.cpp +++ b/src/world/Territory/HousingZone.cpp @@ -85,6 +85,7 @@ bool Sapphire::HousingZone::init() { auto house = make_House( entry.m_houseId, m_landSetId, land->getLandIdent(), entry.m_estateName, entry.m_estateComment ); + housingMgr->updateHouseModels( house ); land->setHouse( house ); } From c345ac2c4eb7c1267c39f34e7bef53bac04b639e Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 17:25:30 +1100 Subject: [PATCH 08/86] correctly load appearance from db --- src/world/Manager/HousingMgr.cpp | 14 +++++++------- src/world/Manager/HousingMgr.h | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index becad6ed..1395ba9a 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -633,19 +633,19 @@ void Sapphire::World::Manager::HousingMgr::sendEstateInventory( Entity::Player& } const Sapphire::World::Manager::HousingMgr::LandSetLandCacheMap& - Sapphire::World::Manager::HousingMgr::getLandCacheMap() const + Sapphire::World::Manager::HousingMgr::getLandCacheMap() { return m_landCache; } -Sapphire::World::Manager::HousingMgr::LandIdentToInventoryContainerMap - Sapphire::World::Manager::HousingMgr::getEstateInventories() const +Sapphire::World::Manager::HousingMgr::LandIdentToInventoryContainerMap& + Sapphire::World::Manager::HousingMgr::getEstateInventories() { return m_estateInventories; } -Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap - Sapphire::World::Manager::HousingMgr::getEstateInventory( uint64_t ident ) const +Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap& + Sapphire::World::Manager::HousingMgr::getEstateInventory( uint64_t ident ) { auto map = m_estateInventories.find( ident ); @@ -654,8 +654,8 @@ Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap return map->second; } -Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap - Sapphire::World::Manager::HousingMgr::getEstateInventory( Sapphire::Common::LandIdent ident ) const +Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap& + Sapphire::World::Manager::HousingMgr::getEstateInventory( Sapphire::Common::LandIdent ident ) { auto u64ident = *reinterpret_cast< uint64_t* >( &ident ); diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index 3609c173..d0c59a6c 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -110,27 +110,27 @@ namespace Sapphire::World::Manager * @brief Get the land & house data that was cached on world startup. * @return */ - const LandSetLandCacheMap& getLandCacheMap() const; + const LandSetLandCacheMap& getLandCacheMap(); /*! * @brief Get all loaded inventories for housing estates * @return */ - LandIdentToInventoryContainerMap getEstateInventories() const; + LandIdentToInventoryContainerMap& getEstateInventories(); /*! * @brief Get an estate inventory for a specific estate * @param ident LandIdent for the specified estate * @return A map containing container ids to ItemContainerPtr */ - ContainerIdToContainerMap getEstateInventory( uint64_t ident ) const; + ContainerIdToContainerMap& getEstateInventory( uint64_t ident ); /*! * @brief Get an estate inventory for a specific estate * @param ident LandIdent for the specified estate * @return A map containing container ids to ItemContainerPtr */ - ContainerIdToContainerMap getEstateInventory( Common::LandIdent ident ) const; + ContainerIdToContainerMap& getEstateInventory( Common::LandIdent ident ); private: void loadLandCache(); bool loadEstateInventories(); From 40e3865782e13c99fe40a1ae1a96e6fcfe4c55ca Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 17:29:40 +1100 Subject: [PATCH 09/86] cleanup old house apperance crap --- src/common/Database/ZoneDbConnection.cpp | 2 +- src/world/Territory/House.cpp | 76 +----------------------- 2 files changed, 4 insertions(+), 74 deletions(-) diff --git a/src/common/Database/ZoneDbConnection.cpp b/src/common/Database/ZoneDbConnection.cpp index a5104467..a19f32d9 100644 --- a/src/common/Database/ZoneDbConnection.cpp +++ b/src/common/Database/ZoneDbConnection.cpp @@ -197,7 +197,7 @@ void Sapphire::Db::ZoneDbConnection::doPrepareStatements() CONNECTION_BOTH ); prepareStatement( HOUSING_HOUSE_UP, - "UPDATE house SET BuildTime = ?, Aetheryte = ?, Comment = ?, HouseName = ?, Endorsements = ?, HousePartModels = ?, HousePartColours = ?, HouseInteriorModels = ? WHERE HouseId = ?;", + "UPDATE house SET BuildTime = ?, Aetheryte = ?, Comment = ?, HouseName = ?, Endorsements = ? WHERE HouseId = ?;", CONNECTION_BOTH ); prepareStatement( LAND_INV_SEL_ALL, diff --git a/src/world/Territory/House.cpp b/src/world/Territory/House.cpp index b4be2e63..404f9f47 100644 --- a/src/world/Territory/House.cpp +++ b/src/world/Territory/House.cpp @@ -21,47 +21,7 @@ Sapphire::House::House( uint32_t houseId, uint32_t landSetId, Common::LandIdent m_estateName( estateName ), m_estateComment( estateComment ) { -// auto pDB = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); -// -// // todo: convert to prepared statement -// auto res = pDB->query( "SELECT * FROM house WHERE HouseId = " + std::to_string( houseId ) ); -// -// if( !res->next() ) -// { -// g_fw.get< Sapphire::Logger >()->info( "Creating house House#" + std::to_string( houseId ) + " in LandSet#" + std::to_string( landSetId ) ); -// -// auto stmt = pDB->getPreparedStatement( Db::HOUSING_HOUSE_INS ); -// -// stmt->setUInt( 1, m_landSetId ); -// stmt->setUInt( 2, m_houseId ); -// -// pDB->execute( stmt ); -// -// // todo: make this nicer/configurable? -// m_estateName = "Estate #" + std::to_string( m_landIdent.landId + 1 ); -// } -// else -// { -// m_estateComment = res->getString( "Comment" ); -// m_estateName = res->getString( "HouseName" ); -// -// auto housePartModels = res->getBlobVector( "HousePartModels" ); -// auto housePartColours = res->getBlobVector( "HousePartColours" ); -// -// auto models = reinterpret_cast< uint32_t* >( &housePartModels[ 0 ] ); -// for( auto i = 0; i < 8; i++ ) -// { -// m_houseModelsCache[ i ] = { models[ i ], housePartColours[ i ] }; -// } -// -// auto houseInteriorModels = res->getBlobVector( "HouseInteriorModels" ); -// -// auto interiorModels = reinterpret_cast< uint32_t* >( &houseInteriorModels[ 0 ] ); -// for( auto i = 0; i < 10; i++ ) -// { -// m_houseInteriorModels[ i ] = interiorModels[ i ]; -// } -// } + } Sapphire::House::~House() = default; @@ -70,10 +30,9 @@ void Sapphire::House::updateHouseDb() { auto pDB = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); - // BuildTime = 1, Aetheryte = 2, Comment = 3, HouseName = 4, Endorsements = 5, - // HousePartModels = 6, HousePartColours = 7, HouseId = 8 + // BuildTime = 1, Aetheryte = 2, Comment = 3, HouseName = 4, Endorsements = 5, HouseId = 6 auto stmt = pDB->getPreparedStatement( Db::HOUSING_HOUSE_UP ); - stmt->setUInt( 9, m_houseId ); + stmt->setUInt( 6, m_houseId ); stmt->setInt64( 1, m_buildTime ); stmt->setInt( 2, 0 ); @@ -83,35 +42,6 @@ void Sapphire::House::updateHouseDb() stmt->setUInt64( 5, 0 ); - std::vector< uint32_t > models; - std::vector< uint8_t > colours; - - for( auto i = 0; i < 8; i++ ) - { - auto& part = m_houseModelsCache[ i ]; - models.push_back( part.first ); - colours.push_back( part.second ); - } - - // todo: this is shit - std::vector< uint8_t > tmpModels( models.size() * 4 ); - memcpy( tmpModels.data(), models.data(), tmpModels.size() ); - - stmt->setBinary( 6, tmpModels ); - stmt->setBinary( 7, colours ); - - models.clear(); - - for( auto i = 0; i < 10; i++ ) - { - models.push_back( m_houseInteriorModels[ i ] ); - } - - std::vector< uint8_t > tmp2Models( models.size() * 4 ); - memcpy( tmp2Models.data(), models.data(), tmp2Models.size() ); - - stmt->setBinary( 8, tmp2Models ); - pDB->execute( stmt ); } From 517b0912f0fa0a2d29a86e144d54c3f5318e31ae Mon Sep 17 00:00:00 2001 From: Adam <893184+NotAdam@users.noreply.github.com> Date: Sat, 22 Dec 2018 17:54:56 +1100 Subject: [PATCH 10/86] fix autism --- src/world/Manager/HousingMgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 1395ba9a..50138589 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -659,7 +659,7 @@ Sapphire::World::Manager::HousingMgr::ContainerIdToContainerMap& { auto u64ident = *reinterpret_cast< uint64_t* >( &ident ); - getEstateInventory( u64ident ); + return getEstateInventory( u64ident ); } void Sapphire::World::Manager::HousingMgr::updateHouseModels( Sapphire::HousePtr house ) @@ -692,4 +692,4 @@ void Sapphire::World::Manager::HousingMgr::updateHouseModels( Sapphire::HousePtr house->setHouseInteriorPart( static_cast< Common::HousingInteriorSlot >( item.first ), getItemData( item.second->getId() ) ); } } -} \ No newline at end of file +} From f29e72942b68caa919942667c040abdcadb15dbe Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 21:20:12 +1100 Subject: [PATCH 11/86] show error messages in the event of an invalid house appearance inv --- src/world/Manager/HousingMgr.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 50138589..1be326fd 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -683,6 +683,10 @@ void Sapphire::World::Manager::HousingMgr::updateHouseModels( Sapphire::HousePtr house->setHousePart( static_cast< Common::HousePartSlot >( item.first ), getItemData( item.second->getId() ) ); } } + else + { + g_fw.get< Logger >()->error( "Plot " + std::to_string( house->getLandIdent().landId ) + " has an invalid inventory configuration for outdoor appearance." ); + } auto intContainer = containers.find( static_cast< uint16_t >( InventoryType::HousingInteriorAppearance ) ); if( intContainer != containers.end() ) @@ -692,4 +696,8 @@ void Sapphire::World::Manager::HousingMgr::updateHouseModels( Sapphire::HousePtr house->setHouseInteriorPart( static_cast< Common::HousingInteriorSlot >( item.first ), getItemData( item.second->getId() ) ); } } + else + { + g_fw.get< Logger >()->error( "Plot " + std::to_string( house->getLandIdent().landId ) + " has an invalid inventory configuration for indoor appearance." ); + } } From 32a8cccb12de615d651f2c79cf122fe1c7df6ade Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 23:33:38 +1100 Subject: [PATCH 12/86] refactor housepart to housemodel --- src/world/Manager/HousingMgr.cpp | 5 ++- src/world/Territory/House.cpp | 12 +++--- src/world/Territory/House.h | 12 +++--- .../Housing/HousingInteriorTerritory.cpp | 3 +- src/world/Territory/Land.cpp | 42 ++++++++++++------- 5 files changed, 45 insertions(+), 29 deletions(-) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 1be326fd..cb4ff6f7 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -680,7 +680,7 @@ void Sapphire::World::Manager::HousingMgr::updateHouseModels( Sapphire::HousePtr { for( auto& item : extContainer->second->getItemMap() ) { - house->setHousePart( static_cast< Common::HousePartSlot >( item.first ), getItemData( item.second->getId() ) ); + house->setHouseModel( static_cast< Common::HousePartSlot >( item.first ), getItemData( item.second->getId() ) ); } } else @@ -693,7 +693,8 @@ void Sapphire::World::Manager::HousingMgr::updateHouseModels( Sapphire::HousePtr { for( auto& item : intContainer->second->getItemMap() ) { - house->setHouseInteriorPart( static_cast< Common::HousingInteriorSlot >( item.first ), getItemData( item.second->getId() ) ); + house->setHouseInteriorModel( static_cast< Common::HousingInteriorSlot >( item.first ), + getItemData( item.second->getId() ) ); } } else diff --git a/src/world/Territory/House.cpp b/src/world/Territory/House.cpp index 404f9f47..ebacabe0 100644 --- a/src/world/Territory/House.cpp +++ b/src/world/Territory/House.cpp @@ -60,32 +60,32 @@ uint32_t Sapphire::House::getHouseId() const return m_houseId; } -uint8_t Sapphire::House::getHousePartColor( Common::HousePartSlot slot ) const +uint8_t Sapphire::House::getHouseModelColor( Common::HousePartSlot slot ) const { return m_houseModelsCache[ slot ].second; } -uint32_t Sapphire::House::getHouseInteriorPart( Common::HousingInteriorSlot slot ) const +uint32_t Sapphire::House::getHouseInteriorModel( Common::HousingInteriorSlot slot ) const { return m_houseInteriorModels[ slot ]; } -void Sapphire::House::setHousePart( Common::HousePartSlot slot, uint32_t id ) +void Sapphire::House::setHouseModel( Common::HousePartSlot slot, uint32_t id ) { m_houseModelsCache[ slot ].first = id; } -void Sapphire::House::setHousePartColor( Common::HousePartSlot slot, uint32_t id ) +void Sapphire::House::setHouseModelColor( Common::HousePartSlot slot, uint32_t id ) { m_houseModelsCache[ slot ].second = id; } -void Sapphire::House::setHouseInteriorPart( Common::HousingInteriorSlot slot, uint32_t id ) +void Sapphire::House::setHouseInteriorModel( Common::HousingInteriorSlot slot, uint32_t id ) { m_houseInteriorModels[ slot ] = id; } -uint32_t Sapphire::House::getHousePart( Common::HousePartSlot slot ) const +uint32_t Sapphire::House::getHouseModel( Common::HousePartSlot slot ) const { return m_houseModelsCache[ slot ].first; } diff --git a/src/world/Territory/House.h b/src/world/Territory/House.h index f4c71817..c45e30db 100644 --- a/src/world/Territory/House.h +++ b/src/world/Territory/House.h @@ -31,12 +31,12 @@ namespace Sapphire void setHouseGreeting( const std::string& greeting ); //functions - void setHousePart( Common::HousePartSlot slot, uint32_t id ); - void setHousePartColor( Common::HousePartSlot slot, uint32_t id ); - void setHouseInteriorPart( Common::HousingInteriorSlot slot, uint32_t id ); - uint32_t getHousePart( Common::HousePartSlot slot ) const; - uint8_t getHousePartColor( Common::HousePartSlot slot ) const; - uint32_t getHouseInteriorPart( Common::HousingInteriorSlot slot ) const; + void setHouseModel( Common::HousePartSlot slot, uint32_t id ); + void setHouseModelColor( Common::HousePartSlot slot, uint32_t id ); + void setHouseInteriorModel( Common::HousingInteriorSlot slot, uint32_t id ); + uint32_t getHouseModel( Common::HousePartSlot slot ) const; + uint8_t getHouseModelColor( Common::HousePartSlot slot ) const; + uint32_t getHouseInteriorModel( Common::HousingInteriorSlot slot ) const; HouseModelsArray const& getHouseModels() const; diff --git a/src/world/Territory/Housing/HousingInteriorTerritory.cpp b/src/world/Territory/Housing/HousingInteriorTerritory.cpp index da5c399d..e1b87f46 100644 --- a/src/world/Territory/Housing/HousingInteriorTerritory.cpp +++ b/src/world/Territory/Housing/HousingInteriorTerritory.cpp @@ -68,7 +68,8 @@ void Housing::HousingInteriorTerritory::onPlayerZoneIn( Entity::Player& player ) for( auto i = 0; i < 10; i++ ) { - indoorInitPacket->data().indoorItems[ i ] = pHouse->getHouseInteriorPart( static_cast< Common::HousingInteriorSlot >( i ) ); + indoorInitPacket->data().indoorItems[ i ] = pHouse->getHouseInteriorModel( + static_cast< Common::HousingInteriorSlot >( i ) ); } diff --git a/src/world/Territory/Land.cpp b/src/world/Territory/Land.cpp index 4a1d075a..aaa4ef63 100644 --- a/src/world/Territory/Land.cpp +++ b/src/world/Territory/Land.cpp @@ -313,21 +313,35 @@ bool Sapphire::Land::setPreset( uint32_t itemId ) } - getHouse()->setHousePart( Common::HousePartSlot::ExteriorRoof, convertItemIdToHousingItemId( housingPreset->exteriorRoof ) ); - getHouse()->setHousePart( Common::HousePartSlot::ExteriorWall, convertItemIdToHousingItemId( housingPreset->exteriorWall ) ); - getHouse()->setHousePart( Common::HousePartSlot::ExteriorWindow, convertItemIdToHousingItemId( housingPreset->exteriorWindow ) ); - getHouse()->setHousePart( Common::HousePartSlot::ExteriorDoor, convertItemIdToHousingItemId( housingPreset->exteriorDoor ) ); + getHouse()->setHouseModel( Common::HousePartSlot::ExteriorRoof, + convertItemIdToHousingItemId( housingPreset->exteriorRoof ) ); + getHouse()->setHouseModel( Common::HousePartSlot::ExteriorWall, + convertItemIdToHousingItemId( housingPreset->exteriorWall ) ); + getHouse()->setHouseModel( Common::HousePartSlot::ExteriorWindow, + convertItemIdToHousingItemId( housingPreset->exteriorWindow ) ); + getHouse()->setHouseModel( Common::HousePartSlot::ExteriorDoor, + convertItemIdToHousingItemId( housingPreset->exteriorDoor ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorWall, convertItemIdToHousingItemId( housingPreset->interiorWall ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorFloor, convertItemIdToHousingItemId( housingPreset->interiorFlooring ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorLight, convertItemIdToHousingItemId( housingPreset->interiorLighting ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorWall_Attic, convertItemIdToHousingItemId( housingPreset->otherFloorWall ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorFloor_Attic, convertItemIdToHousingItemId( housingPreset->otherFloorFlooring ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorLight_Attic, convertItemIdToHousingItemId( housingPreset->otherFloorLighting ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorWall_Basement, convertItemIdToHousingItemId( housingPreset->basementWall ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorFloor_Basement, convertItemIdToHousingItemId( housingPreset->basementFlooring ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorLight_Basement, convertItemIdToHousingItemId( housingPreset->basementLighting ) ); - getHouse()->setHouseInteriorPart( Common::HousingInteriorSlot::InteriorLight_Mansion, convertItemIdToHousingItemId( housingPreset->mansionLighting ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorWall, + convertItemIdToHousingItemId( housingPreset->interiorWall ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorFloor, + convertItemIdToHousingItemId( housingPreset->interiorFlooring ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorLight, + convertItemIdToHousingItemId( housingPreset->interiorLighting ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorWall_Attic, + convertItemIdToHousingItemId( housingPreset->otherFloorWall ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorFloor_Attic, + convertItemIdToHousingItemId( housingPreset->otherFloorFlooring ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorLight_Attic, + convertItemIdToHousingItemId( housingPreset->otherFloorLighting ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorWall_Basement, + convertItemIdToHousingItemId( housingPreset->basementWall ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorFloor_Basement, + convertItemIdToHousingItemId( housingPreset->basementFlooring ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorLight_Basement, + convertItemIdToHousingItemId( housingPreset->basementLighting ) ); + getHouse()->setHouseInteriorModel( Common::HousingInteriorSlot::InteriorLight_Mansion, + convertItemIdToHousingItemId( housingPreset->mansionLighting ) ); return true; From 616c788e717806479118f2edbfd8d1b7bf1b9aa4 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sat, 22 Dec 2018 23:39:07 +1100 Subject: [PATCH 13/86] cleanup old house cols from db schema --- bin/sql/schema/schema.sql | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/sql/schema/schema.sql b/bin/sql/schema/schema.sql index 185d0225..0b3cfba4 100644 --- a/bin/sql/schema/schema.sql +++ b/bin/sql/schema/schema.sql @@ -404,9 +404,6 @@ CREATE TABLE `house` ( `Comment` binary(193) DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', `HouseName` binary(23) DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', `Endorsements` bigint(20) DEFAULT NULL, - `HousePartModels` binary(32) DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', - `HousePartColours` binary(8) DEFAULT '\0\0\0\0\0\0\0\0', - `HouseInteriorModels` binary(40) DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', `UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(`HouseId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; From d03e7a43a6b68f88fe34558108bfe5202702890d Mon Sep 17 00:00:00 2001 From: Mordred Date: Sat, 22 Dec 2018 22:25:03 +0100 Subject: [PATCH 14/86] Added BaseManager and moved DebugCommandHandler to Manager --- src/world/Actor/Actor.cpp | 2 +- src/world/Actor/Player.cpp | 8 +- src/world/Actor/Player.h | 2 +- src/world/Actor/PlayerSql.cpp | 2 +- src/world/DebugCommand/DebugCommand.h | 9 +- src/world/ForwardsZone.h | 11 +- src/world/Manager/BaseManager.h | 27 +++++ .../DebugCommandMgr.cpp} | 112 ++++++++++-------- .../DebugCommandMgr.h} | 11 +- src/world/Manager/HousingMgr.cpp | 15 ++- src/world/Manager/HousingMgr.h | 5 +- src/world/Manager/LinkshellMgr.cpp | 7 +- src/world/Manager/LinkshellMgr.h | 5 +- src/world/Manager/PlayerMgr.cpp | 13 +- src/world/Manager/PlayerMgr.h | 5 +- src/world/Manager/ShopMgr.cpp | 11 +- src/world/Manager/ShopMgr.h | 4 +- src/world/Manager/TerritoryMgr.cpp | 31 +++-- src/world/Manager/TerritoryMgr.h | 5 +- src/world/Network/GameConnection.cpp | 4 +- src/world/Network/GameConnection.h | 2 +- src/world/Network/Handlers/ActionHandler.cpp | 2 +- .../Network/Handlers/ClientTriggerHandler.cpp | 4 +- .../Network/Handlers/GMCommandHandlers.cpp | 2 +- .../Network/Handlers/InventoryHandler.cpp | 2 +- src/world/Network/Handlers/PacketHandlers.cpp | 10 +- src/world/ServerMgr.cpp | 109 +++++++++-------- src/world/ServerMgr.h | 14 +-- src/world/Session.cpp | 40 +++---- src/world/Session.h | 72 +++++------ src/world/Territory/Zone.cpp | 6 +- src/world/Territory/Zone.h | 6 +- src/world/mainGameServer.cpp | 3 +- 33 files changed, 309 insertions(+), 252 deletions(-) create mode 100644 src/world/Manager/BaseManager.h rename src/world/{DebugCommand/DebugCommandHandler.cpp => Manager/DebugCommandMgr.cpp} (85%) rename src/world/{DebugCommand/DebugCommandHandler.h => Manager/DebugCommandMgr.h} (90%) diff --git a/src/world/Actor/Actor.cpp b/src/world/Actor/Actor.cpp index 2d119fc8..b1684a0f 100644 --- a/src/world/Actor/Actor.cpp +++ b/src/world/Actor/Actor.cpp @@ -297,7 +297,7 @@ Send a packet to all players in range, potentially to self if set and is player */ void Sapphire::Entity::Actor::sendToInRangeSet( Network::Packets::FFXIVPacketBasePtr pPacket, bool bToSelf ) { - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = g_fw.get< World::ServerMgr >(); if( bToSelf && isPlayer() ) { auto pPlayer = getAsPlayer(); diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 49dfdb49..1eaae6fc 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -109,7 +109,7 @@ Sapphire::Entity::Player::~Player() void Sapphire::Entity::Player::injectPacket( const std::string& path ) { - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = g_fw.get< World::ServerMgr >(); auto session = pServerZone->getSession( getId() ); if( session ) session->getZoneConnection()->injectPacket( path, *this ); @@ -1206,7 +1206,7 @@ const uint8_t* Sapphire::Entity::Player::getGcRankArray() const void Sapphire::Entity::Player::queuePacket( Network::Packets::FFXIVPacketBasePtr pPacket ) { - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = g_fw.get< World::ServerMgr >(); auto pSession = pServerZone->getSession( m_id ); if( !pSession ) @@ -1221,7 +1221,7 @@ void Sapphire::Entity::Player::queuePacket( Network::Packets::FFXIVPacketBasePtr void Sapphire::Entity::Player::queueChatPacket( Network::Packets::FFXIVPacketBasePtr pPacket ) { - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = g_fw.get< World::ServerMgr >(); auto pSession = pServerZone->getSession( m_id ); if( !pSession ) @@ -1557,7 +1557,7 @@ void Sapphire::Entity::Player::sendZonePackets() if( isLogin() ) { //Update player map in servermgr - in case player name has been changed - auto pServerMgr = g_fw.get< Sapphire::ServerMgr >(); + auto pServerMgr = g_fw.get< World::ServerMgr >(); pServerMgr->updatePlayerName( getId(), getName() ); } diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index b0c8b1cf..e5b0f050 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -682,7 +682,7 @@ namespace Sapphire::Entity void updateSql(); /*! load player from db, by id */ - bool load( uint32_t charId, SessionPtr pSession ); + bool load( uint32_t charId, World::SessionPtr pSession ); /*! load active class data */ bool loadClassData(); diff --git a/src/world/Actor/PlayerSql.cpp b/src/world/Actor/PlayerSql.cpp index 136ddd40..30f4defd 100644 --- a/src/world/Actor/PlayerSql.cpp +++ b/src/world/Actor/PlayerSql.cpp @@ -29,7 +29,7 @@ using namespace Sapphire::Network::Packets::Server; using namespace Sapphire::World::Manager; // load player from the db -bool Sapphire::Entity::Player::load( uint32_t charId, SessionPtr pSession ) +bool Sapphire::Entity::Player::load( uint32_t charId, World::SessionPtr pSession ) { auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); auto pTeriMgr = g_fw.get< TerritoryMgr >(); diff --git a/src/world/DebugCommand/DebugCommand.h b/src/world/DebugCommand/DebugCommand.h index 5a7c9e2a..40ee8b17 100644 --- a/src/world/DebugCommand/DebugCommand.h +++ b/src/world/DebugCommand/DebugCommand.h @@ -5,16 +5,19 @@ #include "ForwardsZone.h" + namespace Sapphire { - - class DebugCommandHandler; + namespace World::Manager + { + class DebugCommandMgr; + } class DebugCommand { public: - using pFunc = void ( DebugCommandHandler::* )( char*, Entity::Player&, std::shared_ptr< DebugCommand > ); + using pFunc = void ( World::Manager::DebugCommandMgr::* )( char*, Entity::Player&, std::shared_ptr< DebugCommand > ); // String for the command std::string m_commandName; diff --git a/src/world/ForwardsZone.h b/src/world/ForwardsZone.h index 585eb46c..f5d9321a 100644 --- a/src/world/ForwardsZone.h +++ b/src/world/ForwardsZone.h @@ -25,10 +25,15 @@ TYPE_FORWARD( House ); TYPE_FORWARD( InstanceContent ); TYPE_FORWARD( Item ); TYPE_FORWARD( ItemContainer ); -TYPE_FORWARD( Session ); TYPE_FORWARD( ZonePosition ); -TYPE_FORWARD( Land ) -TYPE_FORWARD( Linkshell ) +TYPE_FORWARD( Land ); +TYPE_FORWARD( Linkshell ); +TYPE_FORWARD( Framework ); + +namespace World +{ +TYPE_FORWARD( Session ); +} namespace World::Territory::Housing { diff --git a/src/world/Manager/BaseManager.h b/src/world/Manager/BaseManager.h new file mode 100644 index 00000000..c87fd9a6 --- /dev/null +++ b/src/world/Manager/BaseManager.h @@ -0,0 +1,27 @@ +#ifndef SAPPHIRE_MANAGER_H +#define SAPPHIRE_MANAGER_H + +#include "ForwardsZone.h" + +namespace Sapphire::World::Manager +{ + + class BaseManager + { + public: + explicit BaseManager( FrameworkPtr pFw ) : m_pFw( pFw ) {}; + virtual ~BaseManager() = default; + + FrameworkPtr framework() const + { return m_pFw; } + void setFw( FrameworkPtr pFw ) + { m_pFw = pFw; } + + private: + FrameworkPtr m_pFw; + }; + +} + + +#endif //SAPPHIRE_MANAGER_H diff --git a/src/world/DebugCommand/DebugCommandHandler.cpp b/src/world/Manager/DebugCommandMgr.cpp similarity index 85% rename from src/world/DebugCommand/DebugCommandHandler.cpp rename to src/world/Manager/DebugCommandMgr.cpp index b3898656..61f6c15d 100644 --- a/src/world/DebugCommand/DebugCommandHandler.cpp +++ b/src/world/Manager/DebugCommandMgr.cpp @@ -11,8 +11,8 @@ #include #include -#include "DebugCommand.h" -#include "DebugCommandHandler.h" +#include "DebugCommand/DebugCommand.h" +#include "DebugCommandMgr.h" #include "Network/PacketWrappers/ServerNoticePacket.h" #include "Network/PacketWrappers/ActorControlPacket142.h" @@ -37,51 +37,50 @@ #include "Session.h" #include "Framework.h" -extern Sapphire::Framework g_fw; - using namespace Sapphire::Network; using namespace Sapphire::Network::Packets; using namespace Sapphire::Network::Packets::Server; using namespace Sapphire::World::Manager; // instanciate and initialize commands -Sapphire::DebugCommandHandler::DebugCommandHandler() +Sapphire::World::Manager::DebugCommandMgr::DebugCommandMgr( FrameworkPtr pFw ) : + BaseManager( pFw ) { // Push all commands onto the register map ( command name - function - description - required GM level ) - registerCommand( "set", &DebugCommandHandler::set, "Executes SET commands.", 1 ); - registerCommand( "get", &DebugCommandHandler::get, "Executes GET commands.", 1 ); - registerCommand( "add", &DebugCommandHandler::add, "Executes ADD commands.", 1 ); - registerCommand( "inject", &DebugCommandHandler::injectPacket, "Loads and injects a premade packet.", 1 ); - registerCommand( "injectc", &DebugCommandHandler::injectChatPacket, "Loads and injects a premade chat packet.", 1 ); - registerCommand( "replay", &DebugCommandHandler::replay, "Replays a saved capture folder.", 1 ); - registerCommand( "nudge", &DebugCommandHandler::nudge, "Nudges you forward/up/down.", 1 ); - registerCommand( "info", &DebugCommandHandler::serverInfo, "Show server info.", 0 ); - registerCommand( "help", &DebugCommandHandler::help, "Shows registered commands.", 0 ); - registerCommand( "script", &DebugCommandHandler::script, "Server script utilities.", 1 ); - registerCommand( "instance", &DebugCommandHandler::instance, "Instance utilities", 1 ); - registerCommand( "housing", &DebugCommandHandler::housing, "Housing utilities", 1 ); + registerCommand( "set", &DebugCommandMgr::set, "Executes SET commands.", 1 ); + registerCommand( "get", &DebugCommandMgr::get, "Executes GET commands.", 1 ); + registerCommand( "add", &DebugCommandMgr::add, "Executes ADD commands.", 1 ); + registerCommand( "inject", &DebugCommandMgr::injectPacket, "Loads and injects a premade packet.", 1 ); + registerCommand( "injectc", &DebugCommandMgr::injectChatPacket, "Loads and injects a premade chat packet.", 1 ); + registerCommand( "replay", &DebugCommandMgr::replay, "Replays a saved capture folder.", 1 ); + registerCommand( "nudge", &DebugCommandMgr::nudge, "Nudges you forward/up/down.", 1 ); + registerCommand( "info", &DebugCommandMgr::serverInfo, "Show server info.", 0 ); + registerCommand( "help", &DebugCommandMgr::help, "Shows registered commands.", 0 ); + registerCommand( "script", &DebugCommandMgr::script, "Server script utilities.", 1 ); + registerCommand( "instance", &DebugCommandMgr::instance, "Instance utilities", 1 ); + registerCommand( "housing", &DebugCommandMgr::housing, "Housing utilities", 1 ); } // clear all loaded commands -Sapphire::DebugCommandHandler::~DebugCommandHandler() +Sapphire::World::Manager::DebugCommandMgr::~DebugCommandMgr() { for( auto it = m_commandMap.begin(); it != m_commandMap.end(); ++it ) ( *it ).second.reset(); } // add a command set to the register map -void Sapphire::DebugCommandHandler::registerCommand( const std::string& n, DebugCommand::pFunc functionPtr, - const std::string& hText, uint8_t uLevel ) +void Sapphire::World::Manager::DebugCommandMgr::registerCommand( const std::string& n, DebugCommand::pFunc functionPtr, + const std::string& hText, uint8_t uLevel ) { m_commandMap[ std::string( n ) ] = std::make_shared< DebugCommand >( n, functionPtr, hText, uLevel ); } // try to retrieve the command in question, execute if found -void Sapphire::DebugCommandHandler::execCommand( char* data, Entity::Player& player ) +void Sapphire::World::Manager::DebugCommandMgr::execCommand( char* data, Entity::Player& player ) { // define callback pointer - void ( DebugCommandHandler::*pf )( char*, Entity::Player&, std::shared_ptr< DebugCommand > ); + void ( DebugCommandMgr::*pf )( char*, Entity::Player&, std::shared_ptr< DebugCommand > ); std::string commandString; @@ -124,7 +123,8 @@ void Sapphire::DebugCommandHandler::execCommand( char* data, Entity::Player& pla // Definition of the commands /////////////////////////////////////////////////////////////////////////////////////// -void Sapphire::DebugCommandHandler::help( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +void Sapphire::World::Manager::DebugCommandMgr::help( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { player.sendDebug( "Registered debug commands:" ); for( auto cmd : m_commandMap ) @@ -136,11 +136,12 @@ void Sapphire::DebugCommandHandler::help( char* data, Entity::Player& player, st } } -void Sapphire::DebugCommandHandler::set( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +void Sapphire::World::Manager::DebugCommandMgr::set( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pLog = g_fw.get< Logger >(); - auto pTerriMgr = g_fw.get< TerritoryMgr >(); - auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + auto pLog = framework()->get< Logger >(); + auto pTerriMgr = framework()->get< TerritoryMgr >(); + auto pDb = framework()->get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); std::string subCommand = ""; std::string params = ""; @@ -375,9 +376,10 @@ void Sapphire::DebugCommandHandler::set( char* data, Entity::Player& player, std } -void Sapphire::DebugCommandHandler::add( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +void Sapphire::World::Manager::DebugCommandMgr::add( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pLog = g_fw.get< Logger >(); + auto pLog = framework()->get< Logger >(); std::string subCommand; std::string params = ""; @@ -423,7 +425,7 @@ void Sapphire::DebugCommandHandler::add( char* data, Entity::Player& player, std } else if( subCommand == "bnpc" ) { - auto serverZone = g_fw.get< ServerMgr >(); + auto serverZone = framework()->get< World::ServerMgr >(); auto bNpcTemplate = serverZone->getBNpcTemplate( params ); @@ -509,10 +511,11 @@ void Sapphire::DebugCommandHandler::add( char* data, Entity::Player& player, std } -void Sapphire::DebugCommandHandler::get( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +void Sapphire::World::Manager::DebugCommandMgr::get( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pLog = g_fw.get< Logger >(); - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pLog = framework()->get< Logger >(); + auto pExdData = framework()->get< Data::ExdDataGenerated >(); std::string subCommand; std::string params = ""; @@ -556,27 +559,29 @@ void Sapphire::DebugCommandHandler::get( char* data, Entity::Player& player, std } void -Sapphire::DebugCommandHandler::injectPacket( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +Sapphire::World::Manager::DebugCommandMgr::injectPacket( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = framework()->get< World::ServerMgr >(); auto pSession = pServerZone->getSession( player.getId() ); if( pSession ) pSession->getZoneConnection()->injectPacket( data + 7, player ); } -void Sapphire::DebugCommandHandler::injectChatPacket( char* data, Entity::Player& player, - std::shared_ptr< DebugCommand > command ) +void Sapphire::World::Manager::DebugCommandMgr::injectChatPacket( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = framework()->get< World::ServerMgr >(); auto pSession = pServerZone->getSession( player.getId() ); if( pSession ) pSession->getChatConnection()->injectPacket( data + 8, player ); } -void Sapphire::DebugCommandHandler::replay( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +void Sapphire::World::Manager::DebugCommandMgr::replay( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pLog = g_fw.get< Logger >(); - auto pServerZone = g_fw.get< ServerMgr >(); + auto pLog = framework()->get< Logger >(); + auto pServerZone = framework()->get< World::ServerMgr >(); std::string subCommand; std::string params = ""; @@ -625,7 +630,8 @@ void Sapphire::DebugCommandHandler::replay( char* data, Entity::Player& player, } -void Sapphire::DebugCommandHandler::nudge( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +void Sapphire::World::Manager::DebugCommandMgr::nudge( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { std::string subCommand; @@ -672,18 +678,20 @@ void Sapphire::DebugCommandHandler::nudge( char* data, Entity::Player& player, s } void -Sapphire::DebugCommandHandler::serverInfo( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +Sapphire::World::Manager::DebugCommandMgr::serverInfo( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = framework()->get< World::ServerMgr >(); player.sendDebug( "SapphireZone " + Version::VERSION + "\nRev: " + Version::GIT_HASH ); player.sendDebug( "Compiled: " __DATE__ " " __TIME__ ); player.sendDebug( "Sessions: " + std::to_string( pServerZone->getSessionCount() ) ); } -void Sapphire::DebugCommandHandler::script( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +void Sapphire::World::Manager::DebugCommandMgr::script( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pLog = g_fw.get< Logger >(); - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); + auto pLog = framework()->get< Logger >(); + auto pScriptMgr = framework()->get< Scripting::ScriptMgr >(); std::string subCommand; std::string params = ""; @@ -769,9 +777,10 @@ void Sapphire::DebugCommandHandler::script( char* data, Entity::Player& player, } void -Sapphire::DebugCommandHandler::instance( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +Sapphire::World::Manager::DebugCommandMgr::instance( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pTeriMgr = framework()->get< TerritoryMgr >(); std::string cmd( data ), params, subCommand; auto cmdPos = cmd.find_first_of( ' ' ); @@ -985,9 +994,10 @@ Sapphire::DebugCommandHandler::instance( char* data, Entity::Player& player, std } } -void Sapphire::DebugCommandHandler::housing( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command ) +void Sapphire::World::Manager::DebugCommandMgr::housing( char* data, Entity::Player& player, + std::shared_ptr< DebugCommand > command ) { - auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pTeriMgr = framework()->get< TerritoryMgr >(); std::string cmd( data ), params, subCommand; auto cmdPos = cmd.find_first_of( ' ' ); diff --git a/src/world/DebugCommand/DebugCommandHandler.h b/src/world/Manager/DebugCommandMgr.h similarity index 90% rename from src/world/DebugCommand/DebugCommandHandler.h rename to src/world/Manager/DebugCommandMgr.h index 02bf76d8..304dd738 100644 --- a/src/world/DebugCommand/DebugCommandHandler.h +++ b/src/world/Manager/DebugCommandMgr.h @@ -4,23 +4,24 @@ #include #include -#include "DebugCommand.h" +#include "DebugCommand/DebugCommand.h" #include "ForwardsZone.h" +#include "BaseManager.h" -namespace Sapphire +namespace Sapphire::World::Manager { // handler for in game commands - class DebugCommandHandler + class DebugCommandMgr : public Manager::BaseManager { private: // container mapping command string to command object std::map< std::string, std::shared_ptr< DebugCommand > > m_commandMap; public: - DebugCommandHandler(); + DebugCommandMgr( FrameworkPtr pFw ); - ~DebugCommandHandler(); + ~DebugCommandMgr(); // register command to command map void registerCommand( const std::string& n, DebugCommand::pFunc, const std::string& hText, uint8_t uLevel ); diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 44846d0e..2334b0bb 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -31,9 +31,8 @@ using namespace Sapphire::Network; using namespace Sapphire::Network::Packets; using namespace Sapphire::Network::Packets::Server; -extern Sapphire::Framework g_fw; - -Sapphire::World::Manager::HousingMgr::HousingMgr() +Sapphire::World::Manager::HousingMgr::HousingMgr( FrameworkPtr pFw ) : + BaseManager( pFw ) { } @@ -56,13 +55,13 @@ uint32_t Sapphire::World::Manager::HousingMgr::toLandSetId( uint16_t territoryTy Sapphire::Data::HousingZonePtr Sapphire::World::Manager::HousingMgr::getHousingZoneByLandSetId( uint32_t id ) { - auto pTeriMgr = g_fw.get< TerritoryMgr >(); + auto pTeriMgr = framework()->get< TerritoryMgr >(); return std::dynamic_pointer_cast< HousingZone >( pTeriMgr->getZoneByLandSetId( id ) ); } Sapphire::LandPtr Sapphire::World::Manager::HousingMgr::getLandByOwnerId( uint32_t id ) { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + auto pDb = framework()->get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); auto res = pDb->query( "SELECT LandSetId, LandId FROM land WHERE OwnerId = " + std::to_string( id ) ); if( !res->next() ) @@ -104,7 +103,7 @@ void Sapphire::World::Manager::HousingMgr::sendLandSignOwned( Entity::Player& pl } uint32_t playerId = land->getOwnerId(); - std::string playerName = g_fw.get< Sapphire::ServerMgr >()->getPlayerNameFromDb( playerId ); + std::string playerName = framework()->get< World::ServerMgr >()->getPlayerNameFromDb( playerId ); memcpy( &landInfoSignPacket->data().ownerName, playerName.c_str(), playerName.size() ); @@ -278,7 +277,7 @@ void Sapphire::World::Manager::HousingMgr::sendWardLandInfo( Entity::Player& pla entry.infoFlags |= Common::WardlandFlags::IsEstateOwned; auto owner = land->getOwnerId(); - auto playerName = g_fw.get< Sapphire::ServerMgr >()->getPlayerNameFromDb( owner ); + auto playerName = framework()->get< World::ServerMgr >()->getPlayerNameFromDb( owner ); memcpy( &entry.estateOwnerName, playerName.c_str(), playerName.size() ); break; @@ -514,6 +513,6 @@ void Sapphire::World::Manager::HousingMgr::sendHousingInventory( Entity::Player& if( !container ) return; - auto invMgr = g_fw.get< Manager::InventoryMgr >(); + auto invMgr = framework()->get< Manager::InventoryMgr >(); invMgr->sendInventoryContainer( player, container ); } \ No newline at end of file diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index b4334714..5c44a066 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -2,6 +2,7 @@ #define SAPPHIRE_HOUSINGMGR_H #include "Forwards.h" +#include "BaseManager.h" #include "Territory/HousingZone.h" #include #include @@ -13,11 +14,11 @@ namespace Sapphire::Data namespace Sapphire::World::Manager { - class HousingMgr + class HousingMgr : public BaseManager { public: - HousingMgr(); + HousingMgr( FrameworkPtr pFw ); virtual ~HousingMgr(); bool init(); diff --git a/src/world/Manager/LinkshellMgr.cpp b/src/world/Manager/LinkshellMgr.cpp index 7f8d8b07..11d56859 100644 --- a/src/world/Manager/LinkshellMgr.cpp +++ b/src/world/Manager/LinkshellMgr.cpp @@ -5,15 +5,14 @@ #include "Framework.h" #include "LinkshellMgr.h" -extern Sapphire::Framework g_fw; - -Sapphire::World::Manager::LinkshellMgr::LinkshellMgr() +Sapphire::World::Manager::LinkshellMgr::LinkshellMgr( FrameworkPtr pFw ) : + BaseManager( pFw ) { } bool Sapphire::World::Manager::LinkshellMgr::loadLinkshells() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + auto pDb = framework()->get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); auto res = pDb->query( "SELECT LinkshellId, MasterCharacterId, CharacterIdList, " "LinkshellName, LeaderIdList, InviteIdList " "FROM infolinkshell " diff --git a/src/world/Manager/LinkshellMgr.h b/src/world/Manager/LinkshellMgr.h index 639d64f2..034f7884 100644 --- a/src/world/Manager/LinkshellMgr.h +++ b/src/world/Manager/LinkshellMgr.h @@ -4,11 +4,12 @@ #include #include #include "ForwardsZone.h" +#include "BaseManager.h" namespace Sapphire::World::Manager { - class LinkshellMgr + class LinkshellMgr : public Manager::BaseManager { private: std::map< uint64_t, LinkshellPtr > m_linkshellIdMap; @@ -19,7 +20,7 @@ namespace Sapphire::World::Manager LinkshellPtr getLinkshellById( uint64_t lsId ); public: - LinkshellMgr(); + LinkshellMgr( FrameworkPtr pFw ); bool loadLinkshells(); }; diff --git a/src/world/Manager/PlayerMgr.cpp b/src/world/Manager/PlayerMgr.cpp index 0c030e82..23cc64e8 100644 --- a/src/world/Manager/PlayerMgr.cpp +++ b/src/world/Manager/PlayerMgr.cpp @@ -10,13 +10,18 @@ #include -extern Sapphire::Framework g_fw; using namespace Sapphire::World::Manager; +Sapphire::World::Manager::PlayerMgr::PlayerMgr( Sapphire::FrameworkPtr pFw ) : + BaseManager( pFw ) +{ + +} + void Sapphire::World::Manager::PlayerMgr::movePlayerToLandDestination( Sapphire::Entity::Player& player, uint32_t landId, uint16_t param ) { // check if we have one in the db first - auto terriMgr = g_fw.get< TerritoryMgr >(); + auto terriMgr = framework()->get< TerritoryMgr >(); if( !terriMgr ) return; @@ -28,7 +33,7 @@ void Sapphire::World::Manager::PlayerMgr::movePlayerToLandDestination( Sapphire: // check if its a housing zone, zoning is different here if( terriMgr->isHousingTerritory( terriPos->getTargetZoneId() ) ) { - auto housingMgr = g_fw.get< HousingMgr >(); + auto housingMgr = framework()->get< HousingMgr >(); auto landSetId = housingMgr->toLandSetId( terriPos->getTargetZoneId(), param ); auto housingZone = housingMgr->getHousingZoneByLandSetId( landSetId ); @@ -64,4 +69,4 @@ void Sapphire::World::Manager::PlayerMgr::movePlayerToLandDestination( Sapphire: if( terriMgr->movePlayer( destinationZone, player.getAsPlayer() ) ) player.sendZonePackets(); -} \ No newline at end of file +} diff --git a/src/world/Manager/PlayerMgr.h b/src/world/Manager/PlayerMgr.h index 37592972..0b0cbd13 100644 --- a/src/world/Manager/PlayerMgr.h +++ b/src/world/Manager/PlayerMgr.h @@ -1,10 +1,13 @@ #include "ForwardsZone.h" +#include "BaseManager.h" namespace Sapphire::World::Manager { - class PlayerMgr +class PlayerMgr : public Manager::BaseManager { public: + PlayerMgr( FrameworkPtr pFw ); + void movePlayerToLandDestination( Sapphire::Entity::Player& player, uint32_t landId, uint16_t param = 0 ); }; } \ No newline at end of file diff --git a/src/world/Manager/ShopMgr.cpp b/src/world/Manager/ShopMgr.cpp index 9eb4ed09..30470fa2 100644 --- a/src/world/Manager/ShopMgr.cpp +++ b/src/world/Manager/ShopMgr.cpp @@ -5,12 +5,17 @@ #include #include -extern Sapphire::Framework g_fw; using namespace Sapphire; +Sapphire::World::Manager::ShopMgr::ShopMgr( FrameworkPtr pFw ) : + BaseManager( pFw ) +{ + +} + bool Sapphire::World::Manager::ShopMgr::purchaseGilShopItem( Entity::Player& player, uint32_t shopId, uint16_t itemId, uint32_t quantity ) { - auto exdData = g_fw.get< Data::ExdDataGenerated >(); + auto exdData = framework()->get< Data::ExdDataGenerated >(); if( !exdData ) return false; @@ -33,4 +38,4 @@ bool Sapphire::World::Manager::ShopMgr::purchaseGilShopItem( Entity::Player& pla player.removeCurrency( Common::CurrencyType::Gil, price ); return true; -} \ No newline at end of file +} diff --git a/src/world/Manager/ShopMgr.h b/src/world/Manager/ShopMgr.h index 17f3c55f..6464d026 100644 --- a/src/world/Manager/ShopMgr.h +++ b/src/world/Manager/ShopMgr.h @@ -1,10 +1,12 @@ #include "ForwardsZone.h" +#include "BaseManager.h" namespace Sapphire::World::Manager { - class ShopMgr + class ShopMgr : public Manager::BaseManager { public: + ShopMgr( FrameworkPtr pFw ); bool purchaseGilShopItem( Sapphire::Entity::Player& player, uint32_t shopId, uint16_t itemId, uint32_t quantity ); }; } \ No newline at end of file diff --git a/src/world/Manager/TerritoryMgr.cpp b/src/world/Manager/TerritoryMgr.cpp index cd1a2301..18ca39e0 100644 --- a/src/world/Manager/TerritoryMgr.cpp +++ b/src/world/Manager/TerritoryMgr.cpp @@ -17,9 +17,8 @@ #include "Territory/House.h" #include "Territory/Housing/HousingInteriorTerritory.h" -extern Sapphire::Framework g_fw; - -Sapphire::World::Manager::TerritoryMgr::TerritoryMgr() : +Sapphire::World::Manager::TerritoryMgr::TerritoryMgr( Sapphire::FrameworkPtr pFw ) : + BaseManager( pFw ), m_lastInstanceId( 10000 ) { @@ -27,7 +26,7 @@ Sapphire::World::Manager::TerritoryMgr::TerritoryMgr() : void Sapphire::World::Manager::TerritoryMgr::loadTerritoryTypeDetailCache() { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pExdData = framework()->get< Data::ExdDataGenerated >(); auto idList = pExdData->getTerritoryTypeIdList(); for( auto id : idList ) @@ -137,8 +136,8 @@ bool Sapphire::World::Manager::TerritoryMgr::isHousingTerritory( uint32_t territ bool Sapphire::World::Manager::TerritoryMgr::createDefaultTerritories() { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pLog = g_fw.get< Logger >(); + auto pExdData = framework()->get< Data::ExdDataGenerated >(); + auto pLog = framework()->get< Logger >(); // for each entry in territoryTypeExd, check if it is a normal and if so, add the zone object for( const auto& territory : m_territoryTypeDetailCacheMap ) { @@ -179,8 +178,8 @@ bool Sapphire::World::Manager::TerritoryMgr::createDefaultTerritories() bool Sapphire::World::Manager::TerritoryMgr::createHousingTerritories() { //separate housing zones from default - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pLog = g_fw.get< Logger >(); + auto pExdData = framework()->get< Data::ExdDataGenerated >(); + auto pLog = framework()->get< Logger >(); for( const auto& territory : m_territoryTypeDetailCacheMap ) { auto territoryTypeId = territory.first; @@ -232,8 +231,8 @@ Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::createTerritoryInstanc if( isInstanceContentTerritory( territoryTypeId ) ) return nullptr; - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); - auto pLog = g_fw.get< Logger >(); + auto pExdData = framework()->get< Data::ExdDataGenerated >(); + auto pLog = framework()->get< Logger >(); auto pTeri = getTerritoryDetail( territoryTypeId ); auto pPlaceName = pExdData->get< Sapphire::Data::PlaceName >( pTeri->placeName ); @@ -256,7 +255,7 @@ Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::createTerritoryInstanc Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::createInstanceContent( uint32_t contentFinderConditionId ) { - auto pExdData = g_fw.get< Data::ExdDataGenerated >(); + auto pExdData = framework()->get< Data::ExdDataGenerated >(); auto pContentFinderCondition = pExdData->get< Sapphire::Data::ContentFinderCondition >( contentFinderConditionId ); if( !pContentFinderCondition ) return nullptr; @@ -274,7 +273,7 @@ Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::createInstanceContent( if( !pTeri || pInstanceContent->name.empty() ) return nullptr; - auto pLog = g_fw.get< Logger >(); + auto pLog = framework()->get< Logger >(); pLog->debug( "Starting instance for InstanceContent id: " + std::to_string( instanceContentId ) + " (" + pInstanceContent->name + ")" ); @@ -301,7 +300,7 @@ Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::findOrCreateHousingInt } // otherwise, create it - auto housingMgr = g_fw.get< Manager::HousingMgr >(); + auto housingMgr = framework()->get< Manager::HousingMgr >(); auto parentZone = std::dynamic_pointer_cast< HousingZone >( getZoneByLandSetId( housingMgr->toLandSetId( static_cast< uint16_t >( landIdent.territoryTypeId ), @@ -395,7 +394,7 @@ Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::getInstanceZonePtr( ui void Sapphire::World::Manager::TerritoryMgr::loadTerritoryPositionMap() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + auto pDb = framework()->get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); auto pQR = pDb->query( "SELECT id, target_zone_id, pos_x, pos_y, pos_z, pos_o, radius FROM zonepositions;" ); while( pQR->next() ) @@ -454,7 +453,7 @@ void Sapphire::World::Manager::TerritoryMgr::updateTerritoryInstances( uint32_t zone->update( currentTime ); } - auto pLog = g_fw.get< Logger >(); + auto pLog = framework()->get< Logger >(); // remove internal house zones with nobody in them for( auto it = m_landIdentToZonePtrMap.begin(); it != m_landIdentToZonePtrMap.end(); ) @@ -502,7 +501,7 @@ bool Sapphire::World::Manager::TerritoryMgr::movePlayer( uint32_t territoryTypeI bool Sapphire::World::Manager::TerritoryMgr::movePlayer( ZonePtr pZone, Sapphire::Entity::PlayerPtr pPlayer ) { - auto pLog = g_fw.get< Logger >(); + auto pLog = framework()->get< Logger >(); if( !pZone ) { pLog->error( "Zone not found on this server." ); diff --git a/src/world/Manager/TerritoryMgr.h b/src/world/Manager/TerritoryMgr.h index 794c87af..3560338a 100644 --- a/src/world/Manager/TerritoryMgr.h +++ b/src/world/Manager/TerritoryMgr.h @@ -2,6 +2,7 @@ #define SAPPHIRE_TERRITORYMGR_H #include "ForwardsZone.h" +#include "BaseManager.h" #include #include @@ -26,7 +27,7 @@ namespace Sapphire::World::Manager This class manages persistent and temporary instances alike. */ - class TerritoryMgr + class TerritoryMgr : public Manager::BaseManager { public: @@ -59,7 +60,7 @@ namespace Sapphire::World::Manager //Eureka = 41, // wat }; - TerritoryMgr(); + TerritoryMgr( FrameworkPtr pFw ); /*! initializes the territoryMgr */ bool init(); diff --git a/src/world/Network/GameConnection.cpp b/src/world/Network/GameConnection.cpp index 25c42c9b..6bec8a3f 100644 --- a/src/world/Network/GameConnection.cpp +++ b/src/world/Network/GameConnection.cpp @@ -12,7 +12,7 @@ #include "Network/PacketWrappers/InitUIPacket.h" -#include "DebugCommand/DebugCommandHandler.h" +#include "Manager/DebugCommandMgr.h" #include "GameConnection.h" #include "ServerMgr.h" @@ -397,7 +397,7 @@ void Sapphire::Network::GameConnection::handlePackets( const Sapphire::Network:: const std::vector< Sapphire::Network::Packets::FFXIVARR_PACKET_RAW >& packetData ) { auto pLog = g_fw.get< Logger >(); - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = g_fw.get< World::ServerMgr >(); // if a session is set, update the last time it recieved a game packet if( m_pSession ) m_pSession->updateLastDataTime(); diff --git a/src/world/Network/GameConnection.h b/src/world/Network/GameConnection.h index 3efbdde5..03d04014 100644 --- a/src/world/Network/GameConnection.h +++ b/src/world/Network/GameConnection.h @@ -47,7 +47,7 @@ namespace Sapphire::Network HandlerMap m_chatHandlerMap; HandlerStrMap m_chatHandlerStrMap; - SessionPtr m_pSession; + World::SessionPtr m_pSession; LockedQueue< Sapphire::Network::Packets::FFXIVARR_PACKET_RAW > m_inQueue; LockedQueue< Packets::FFXIVPacketBasePtr > m_outQueue; diff --git a/src/world/Network/Handlers/ActionHandler.cpp b/src/world/Network/Handlers/ActionHandler.cpp index b6e4f1db..22633834 100644 --- a/src/world/Network/Handlers/ActionHandler.cpp +++ b/src/world/Network/Handlers/ActionHandler.cpp @@ -17,7 +17,7 @@ #include "Network/PacketWrappers/PlayerStateFlagsPacket.h" -#include "DebugCommand/DebugCommandHandler.h" +#include "Manager/DebugCommandMgr.h" #include "Action/Action.h" #include "Action/ActionCast.h" diff --git a/src/world/Network/Handlers/ClientTriggerHandler.cpp b/src/world/Network/Handlers/ClientTriggerHandler.cpp index de7528c2..c1cb6ffb 100644 --- a/src/world/Network/Handlers/ClientTriggerHandler.cpp +++ b/src/world/Network/Handlers/ClientTriggerHandler.cpp @@ -22,7 +22,7 @@ #include "Network/PacketWrappers/ServerNoticePacket.h" #include "Network/PacketWrappers/ActorControlPacket142.h" -#include "DebugCommand/DebugCommandHandler.h" +#include "Manager/DebugCommandMgr.h" #include "Event/EventHelper.h" @@ -48,7 +48,7 @@ void examineHandler( Sapphire::Entity::Player& player, uint32_t targetId ) { using namespace Sapphire; - auto pSession = g_fw.get< Sapphire::ServerMgr >()->getSession( targetId ); + auto pSession = g_fw.get< World::ServerMgr >()->getSession( targetId ); if( pSession ) { auto pTarget = pSession->getPlayer(); diff --git a/src/world/Network/Handlers/GMCommandHandlers.cpp b/src/world/Network/Handlers/GMCommandHandlers.cpp index ce9992ea..d9b40299 100644 --- a/src/world/Network/Handlers/GMCommandHandlers.cpp +++ b/src/world/Network/Handlers/GMCommandHandlers.cpp @@ -552,7 +552,7 @@ void Sapphire::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACK return; auto pLog = g_fw.get< Logger >(); - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = g_fw.get< World::ServerMgr >(); const auto packet = ZoneChannelPacket< Client::FFXIVIpcGmCommand2 >( inPacket ); diff --git a/src/world/Network/Handlers/InventoryHandler.cpp b/src/world/Network/Handlers/InventoryHandler.cpp index 370d0d75..f16b6b0c 100644 --- a/src/world/Network/Handlers/InventoryHandler.cpp +++ b/src/world/Network/Handlers/InventoryHandler.cpp @@ -11,7 +11,7 @@ #include "Territory/Zone.h" #include "Territory/ZonePosition.h" -#include "DebugCommand/DebugCommandHandler.h" +#include "Manager/DebugCommandMgr.h" #include "Actor/Player.h" #include "Session.h" diff --git a/src/world/Network/Handlers/PacketHandlers.cpp b/src/world/Network/Handlers/PacketHandlers.cpp index 1d3f394a..3a6c6625 100644 --- a/src/world/Network/Handlers/PacketHandlers.cpp +++ b/src/world/Network/Handlers/PacketHandlers.cpp @@ -34,7 +34,7 @@ #include "Network/PacketWrappers/EventFinishPacket.h" #include "Network/PacketWrappers/PlayerStateFlagsPacket.h" -#include "DebugCommand/DebugCommandHandler.h" +#include "Manager/DebugCommandMgr.h" #include "Event/EventHelper.h" @@ -113,7 +113,7 @@ void Sapphire::Network::GameConnection::reqExamineSearchCommentHandler( const Pa { auto targetId = *reinterpret_cast< const uint32_t* >( &inPacket.data[ 0x10 ] ); - auto pSession = g_fw.get< Sapphire::ServerMgr >()->getSession( targetId ); + auto pSession = g_fw.get< World::ServerMgr >()->getSession( targetId ); g_fw.get< Sapphire::Logger >()->debug( std::to_string( targetId ) ); @@ -140,7 +140,7 @@ void Sapphire::Network::GameConnection::reqExamineFcInfo( const Packets::FFXIVAR { auto targetId = *reinterpret_cast< const uint32_t* >( &inPacket.data[ 0x18 ] ); - auto pSession = g_fw.get< Sapphire::ServerMgr >()->getSession( targetId ); + auto pSession = g_fw.get< World::ServerMgr >()->getSession( targetId ); g_fw.get< Sapphire::Logger >()->debug( std::to_string( targetId ) ); @@ -528,7 +528,7 @@ void Sapphire::Network::GameConnection::socialListHandler( const Packets::FFXIVA void Sapphire::Network::GameConnection::chatHandler( const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - auto pDebugCom = g_fw.get< DebugCommandHandler >(); + auto pDebugCom = g_fw.get< DebugCommandMgr >(); const auto packet = ZoneChannelPacket< Client::FFXIVIpcChatHandler >( inPacket ); @@ -600,7 +600,7 @@ void Sapphire::Network::GameConnection::tellHandler( const Packets::FFXIVARR_PAC { const auto packet = ZoneChannelPacket< Client::FFXIVIpcTellHandler >( inPacket ); - auto pZoneServer = g_fw.get< ServerMgr >(); + auto pZoneServer = g_fw.get< World::ServerMgr >(); auto pSession = pZoneServer->getSession( packet.data().targetPCName ); diff --git a/src/world/ServerMgr.cpp b/src/world/ServerMgr.cpp index ec597356..1575af8c 100644 --- a/src/world/ServerMgr.cpp +++ b/src/world/ServerMgr.cpp @@ -33,17 +33,15 @@ #include "Manager/LinkshellMgr.h" #include "Manager/TerritoryMgr.h" #include "Manager/HousingMgr.h" -#include "DebugCommand/DebugCommandHandler.h" +#include "Manager/DebugCommandMgr.h" #include "Manager/PlayerMgr.h" #include "Manager/ShopMgr.h" #include "Manager/InventoryMgr.h" - -extern Sapphire::Framework g_fw; - using namespace Sapphire::World::Manager; -Sapphire::ServerMgr::ServerMgr( const std::string& configName ) : +Sapphire::World::ServerMgr::ServerMgr( const std::string& configName, FrameworkPtr pFw ) : + Manager::BaseManager( pFw ), m_configName( configName ), m_bRunning( true ), m_lastDBPingTime( 0 ), @@ -51,19 +49,19 @@ Sapphire::ServerMgr::ServerMgr( const std::string& configName ) : { } -Sapphire::ServerMgr::~ServerMgr() +Sapphire::World::ServerMgr::~ServerMgr() { } -size_t Sapphire::ServerMgr::getSessionCount() const +size_t Sapphire::World::ServerMgr::getSessionCount() const { return m_sessionMapById.size(); } -bool Sapphire::ServerMgr::loadSettings( int32_t argc, char* argv[] ) +bool Sapphire::World::ServerMgr::loadSettings( int32_t argc, char* argv[] ) { - auto pLog = g_fw.get< Sapphire::Logger >(); - auto pConfig = g_fw.get< Sapphire::ConfigMgr >(); + auto pLog = framework()->get< Sapphire::Logger >(); + auto pConfig = framework()->get< Sapphire::ConfigMgr >(); pLog->info( "Loading config " + m_configName ); @@ -80,7 +78,7 @@ bool Sapphire::ServerMgr::loadSettings( int32_t argc, char* argv[] ) return true; } -void Sapphire::ServerMgr::run( int32_t argc, char* argv[] ) +void Sapphire::World::ServerMgr::run( int32_t argc, char* argv[] ) { using namespace Sapphire; using namespace Sapphire::World; @@ -88,12 +86,12 @@ void Sapphire::ServerMgr::run( int32_t argc, char* argv[] ) auto pLog = std::make_shared< Logger >(); pLog->setLogPath( "log/world" ); pLog->init(); - g_fw.set< Logger >( pLog ); + framework()->set< Logger >( pLog ); printBanner(); auto pConfig = std::make_shared< ConfigMgr >(); - g_fw.set< ConfigMgr >( pConfig ); + framework()->set< ConfigMgr >( pConfig ); if( !loadSettings( argc, argv ) ) { pLog->fatal( "Unable to load settings!" ); @@ -109,7 +107,7 @@ void Sapphire::ServerMgr::run( int32_t argc, char* argv[] ) pLog->fatal( "DataPath: " + dataPath ); return; } - g_fw.set< Data::ExdDataGenerated >( pExdData ); + framework()->set< Data::ExdDataGenerated >( pExdData ); Sapphire::Db::ConnectionInfo info; info.password = pConfig->getValue< std::string >( "Database", "Password", "" ); @@ -128,16 +126,16 @@ void Sapphire::ServerMgr::run( int32_t argc, char* argv[] ) pLog->fatal( "Database not initialized properly!" ); return; } - g_fw.set< Db::DbWorkerPool< Db::ZoneDbConnection > >( pDb ); + framework()->set< Db::DbWorkerPool< Db::ZoneDbConnection > >( pDb ); pLog->info( "LinkshellMgr: Caching linkshells" ); - auto pLsMgr = std::make_shared< Manager::LinkshellMgr >(); + auto pLsMgr = std::make_shared< Manager::LinkshellMgr >( framework() ); if( !pLsMgr->loadLinkshells() ) { pLog->fatal( "Unable to load linkshells!" ); return; } - g_fw.set< Manager::LinkshellMgr >( pLsMgr ); + framework()->set< Manager::LinkshellMgr >( pLsMgr ); auto pScript = std::make_shared< Scripting::ScriptMgr >(); if( !pScript->init() ) @@ -145,13 +143,13 @@ void Sapphire::ServerMgr::run( int32_t argc, char* argv[] ) pLog->fatal( "Failed to setup scripts!" ); return; } - g_fw.set< Scripting::ScriptMgr >( pScript ); + framework()->set< Scripting::ScriptMgr >( pScript ); pLog->info( "TerritoryMgr: Setting up zones" ); - auto pTeriMgr = std::make_shared< Manager::TerritoryMgr >(); - auto pHousingMgr = std::make_shared< Manager::HousingMgr >(); - g_fw.set< Manager::HousingMgr >( pHousingMgr ); - g_fw.set< Manager::TerritoryMgr >( pTeriMgr ); + auto pTeriMgr = std::make_shared< Manager::TerritoryMgr >( framework() ); + auto pHousingMgr = std::make_shared< Manager::HousingMgr >( framework() ); + framework()->set< Manager::HousingMgr >( pHousingMgr ); + framework()->set< Manager::TerritoryMgr >( pTeriMgr ); if( !pTeriMgr->init() ) { pLog->fatal( "Failed to setup zones!" ); @@ -166,15 +164,15 @@ void Sapphire::ServerMgr::run( int32_t argc, char* argv[] ) std::vector< std::thread > thread_list; thread_list.emplace_back( std::thread( std::bind( &Network::Hive::Run, hive.get() ) ) ); - auto pDebugCom = std::make_shared< DebugCommandHandler >(); - auto pPlayerMgr = std::make_shared< Manager::PlayerMgr >(); - auto pShopMgr = std::make_shared< Manager::ShopMgr >(); + auto pDebugCom = std::make_shared< DebugCommandMgr >( framework() ); + auto pPlayerMgr = std::make_shared< Manager::PlayerMgr >( framework() ); + auto pShopMgr = std::make_shared< Manager::ShopMgr >( framework() ); auto pInventoryMgr = std::make_shared< Manager::InventoryMgr >(); - g_fw.set< DebugCommandHandler >( pDebugCom ); - g_fw.set< Manager::PlayerMgr >( pPlayerMgr ); - g_fw.set< Manager::ShopMgr >( pShopMgr ); - g_fw.set< Manager::InventoryMgr >( pInventoryMgr ); + framework()->set< DebugCommandMgr >( pDebugCom ); + framework()->set< Manager::PlayerMgr >( pPlayerMgr ); + framework()->set< Manager::ShopMgr >( pShopMgr ); + framework()->set< Manager::InventoryMgr >( pInventoryMgr ); pLog->info( "World server running on " + m_ip + ":" + std::to_string( m_port ) ); @@ -187,19 +185,19 @@ void Sapphire::ServerMgr::run( int32_t argc, char* argv[] ) } -uint16_t Sapphire::ServerMgr::getWorldId() const +uint16_t Sapphire::World::ServerMgr::getWorldId() const { return m_worldId; } -void Sapphire::ServerMgr::setWorldId( uint16_t worldId ) +void Sapphire::World::ServerMgr::setWorldId( uint16_t worldId ) { m_worldId = worldId; } -void Sapphire::ServerMgr::printBanner() const +void Sapphire::World::ServerMgr::printBanner() const { - auto pLog = g_fw.get< Sapphire::Logger >(); + auto pLog = framework()->get< Sapphire::Logger >(); pLog->info( "===========================================================" ); pLog->info( "Sapphire Server Project " ); @@ -209,12 +207,12 @@ void Sapphire::ServerMgr::printBanner() const pLog->info( "===========================================================" ); } -void Sapphire::ServerMgr::mainLoop() +void Sapphire::World::ServerMgr::mainLoop() { - auto pLog = g_fw.get< Logger >(); - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - auto pScriptMgr = g_fw.get< Scripting::ScriptMgr >(); - auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + auto pLog = framework()->get< Logger >(); + auto pTeriMgr = framework()->get< TerritoryMgr >(); + auto pScriptMgr = framework()->get< Scripting::ScriptMgr >(); + auto pDb = framework()->get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); while( isRunning() ) { @@ -290,13 +288,13 @@ void Sapphire::ServerMgr::mainLoop() } } -bool Sapphire::ServerMgr::createSession( uint32_t sessionId ) +bool Sapphire::World::ServerMgr::createSession( uint32_t sessionId ) { - auto pLog = g_fw.get< Sapphire::Logger >(); + auto pLog = framework()->get< Sapphire::Logger >(); std::lock_guard< std::mutex > lock( m_sessionMutex ); - const std::string session_id_str = std::to_string( sessionId ); + const auto session_id_str = std::to_string( sessionId ); auto it = m_sessionMapById.find( sessionId ); @@ -323,15 +321,14 @@ bool Sapphire::ServerMgr::createSession( uint32_t sessionId ) } -void Sapphire::ServerMgr::removeSession( uint32_t sessionId ) +void Sapphire::World::ServerMgr::removeSession( uint32_t sessionId ) { m_sessionMapById.erase( sessionId ); } -Sapphire::SessionPtr Sapphire::ServerMgr::getSession( uint32_t id ) +Sapphire::World::SessionPtr Sapphire::World::ServerMgr::getSession( uint32_t id ) { //std::lock_guard lock( m_sessionMutex ); - auto it = m_sessionMapById.find( id ); if( it != m_sessionMapById.end() ) @@ -340,7 +337,7 @@ Sapphire::SessionPtr Sapphire::ServerMgr::getSession( uint32_t id ) return nullptr; } -Sapphire::SessionPtr Sapphire::ServerMgr::getSession( const std::string& playerName ) +Sapphire::World::SessionPtr Sapphire::World::ServerMgr::getSession( const std::string& playerName ) { //std::lock_guard lock( m_sessionMutex ); @@ -352,18 +349,18 @@ Sapphire::SessionPtr Sapphire::ServerMgr::getSession( const std::string& playerN return nullptr; } -void Sapphire::ServerMgr::removeSession( const std::string& playerName ) +void Sapphire::World::ServerMgr::removeSession( const std::string& playerName ) { m_sessionMapByName.erase( playerName ); } -bool Sapphire::ServerMgr::isRunning() const +bool Sapphire::World::ServerMgr::isRunning() const { return m_bRunning; } -std::string Sapphire::ServerMgr::getPlayerNameFromDb( uint32_t playerId, bool forceDbLoad ) +std::string Sapphire::World::ServerMgr::getPlayerNameFromDb( uint32_t playerId, bool forceDbLoad ) { if( !forceDbLoad ) { @@ -373,7 +370,7 @@ std::string Sapphire::ServerMgr::getPlayerNameFromDb( uint32_t playerId, bool fo return ( it->second ); } - auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + auto pDb = framework()->get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); auto res = pDb->query( "SELECT name FROM charainfo WHERE characterid = " + std::to_string( playerId ) ); if( !res->next() ) @@ -385,16 +382,16 @@ std::string Sapphire::ServerMgr::getPlayerNameFromDb( uint32_t playerId, bool fo return playerName; } -void Sapphire::ServerMgr::updatePlayerName( uint32_t playerId, const std::string & playerNewName ) +void Sapphire::World::ServerMgr::updatePlayerName( uint32_t playerId, const std::string & playerNewName ) { m_playerNameMapById[ playerId ] = playerNewName; } -void Sapphire::ServerMgr::loadBNpcTemplates() +void Sapphire::World::ServerMgr::loadBNpcTemplates() { - auto pDb = g_fw.get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); - auto pTeriMgr = g_fw.get< TerritoryMgr >(); - auto pLog = g_fw.get< Logger >(); + auto pDb = framework()->get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + auto pTeriMgr = framework()->get< TerritoryMgr >(); + auto pLog = framework()->get< Logger >(); auto stmt = pDb->getPreparedStatement( Db::ZoneDbStatements::ZONE_SEL_BNPCTEMPLATES ); @@ -433,7 +430,7 @@ void Sapphire::ServerMgr::loadBNpcTemplates() } -Sapphire::Entity::BNpcTemplatePtr Sapphire::ServerMgr::getBNpcTemplate( const std::string& key ) +Sapphire::Entity::BNpcTemplatePtr Sapphire::World::ServerMgr::getBNpcTemplate( const std::string& key ) { auto it = m_bNpcTemplateMap.find( key ); @@ -443,7 +440,7 @@ Sapphire::Entity::BNpcTemplatePtr Sapphire::ServerMgr::getBNpcTemplate( const st return it->second; } -Sapphire::Entity::BNpcTemplatePtr Sapphire::ServerMgr::getBNpcTemplate( uint32_t id ) +Sapphire::Entity::BNpcTemplatePtr Sapphire::World::ServerMgr::getBNpcTemplate( uint32_t id ) { for( auto entry : m_bNpcTemplateMap ) { diff --git a/src/world/ServerMgr.h b/src/world/ServerMgr.h index 75a22263..a18e0c45 100644 --- a/src/world/ServerMgr.h +++ b/src/world/ServerMgr.h @@ -5,18 +5,18 @@ #include #include - #include "ForwardsZone.h" +#include "Manager/BaseManager.h" -namespace Sapphire +namespace Sapphire::World { - class ServerMgr + class ServerMgr : public Manager::BaseManager { public: - ServerMgr( const std::string& configName ); + ServerMgr( const std::string& configName, FrameworkPtr pFw ); - ~ServerMgr(); + ~ServerMgr() override; void run( int32_t argc, char* argv[] ); @@ -25,8 +25,8 @@ namespace Sapphire void removeSession( uint32_t sessionId ); void removeSession( const std::string& playerName ); - SessionPtr getSession( uint32_t id ); - SessionPtr getSession( const std::string& playerName ); + World::SessionPtr getSession( uint32_t id ); + World::SessionPtr getSession( const std::string& playerName ); size_t getSessionCount() const; diff --git a/src/world/Session.cpp b/src/world/Session.cpp index 144650e0..24085c9e 100644 --- a/src/world/Session.cpp +++ b/src/world/Session.cpp @@ -15,7 +15,7 @@ extern Sapphire::Framework g_fw; namespace fs = std::experimental::filesystem; -Sapphire::Session::Session( uint32_t sessionId ) : +Sapphire::World::Session::Session( uint32_t sessionId ) : m_sessionId( sessionId ), m_lastDataTime( Util::getTimeSeconds() ), m_lastSqlTime( Util::getTimeSeconds() ), @@ -23,34 +23,34 @@ Sapphire::Session::Session( uint32_t sessionId ) : { } -Sapphire::Session::~Session() +Sapphire::World::Session::~Session() { } -void Sapphire::Session::setZoneConnection( Network::GameConnectionPtr pZoneCon ) +void Sapphire::World::Session::setZoneConnection( Network::GameConnectionPtr pZoneCon ) { pZoneCon->m_conType = Network::ConnectionType::Zone; m_pZoneConnection = pZoneCon; } -void Sapphire::Session::setChatConnection( Network::GameConnectionPtr pChatCon ) +void Sapphire::World::Session::setChatConnection( Network::GameConnectionPtr pChatCon ) { pChatCon->m_conType = Network::ConnectionType::Chat; m_pChatConnection = pChatCon; } -Sapphire::Network::GameConnectionPtr Sapphire::Session::getZoneConnection() const +Sapphire::Network::GameConnectionPtr Sapphire::World::Session::getZoneConnection() const { return m_pZoneConnection; } -Sapphire::Network::GameConnectionPtr Sapphire::Session::getChatConnection() const +Sapphire::Network::GameConnectionPtr Sapphire::World::Session::getChatConnection() const { return m_pChatConnection; } -bool Sapphire::Session::loadPlayer() +bool Sapphire::World::Session::loadPlayer() { m_pPlayer = Entity::make_Player(); @@ -67,7 +67,7 @@ bool Sapphire::Session::loadPlayer() } -void Sapphire::Session::close() +void Sapphire::World::Session::close() { if( m_pZoneConnection ) m_pZoneConnection->Disconnect(); @@ -85,37 +85,37 @@ void Sapphire::Session::close() } } -uint32_t Sapphire::Session::getId() const +uint32_t Sapphire::World::Session::getId() const { return m_sessionId; } -int64_t Sapphire::Session::getLastDataTime() const +int64_t Sapphire::World::Session::getLastDataTime() const { return m_lastDataTime; } -int64_t Sapphire::Session::getLastSqlTime() const +int64_t Sapphire::World::Session::getLastSqlTime() const { return m_lastSqlTime; } -bool Sapphire::Session::isValid() const +bool Sapphire::World::Session::isValid() const { return m_isValid; } -void Sapphire::Session::updateLastDataTime() +void Sapphire::World::Session::updateLastDataTime() { m_lastDataTime = Util::getTimeSeconds(); } -void Sapphire::Session::updateLastSqlTime() +void Sapphire::World::Session::updateLastSqlTime() { m_lastSqlTime = Util::getTimeSeconds(); } -void Sapphire::Session::startReplay( const std::string& path ) +void Sapphire::World::Session::startReplay( const std::string& path ) { auto pLog = g_fw.get< Logger >(); if( !fs::exists( path ) ) @@ -161,13 +161,13 @@ void Sapphire::Session::startReplay( const std::string& path ) m_isReplaying = true; } -void Sapphire::Session::stopReplay() +void Sapphire::World::Session::stopReplay() { m_isReplaying = false; m_replayCache.clear(); } -void Sapphire::Session::processReplay() +void Sapphire::World::Session::processReplay() { int at = 0; for( const auto& set : m_replayCache ) @@ -185,7 +185,7 @@ void Sapphire::Session::processReplay() m_isReplaying = false; } -void Sapphire::Session::sendReplayInfo() +void Sapphire::World::Session::sendReplayInfo() { std::string message = std::to_string( m_replayCache.size() ) + " Sets left in cache, "; @@ -197,7 +197,7 @@ void Sapphire::Session::sendReplayInfo() getPlayer()->sendDebug( message ); } -void Sapphire::Session::update() +void Sapphire::World::Session::update() { if( m_isReplaying ) processReplay(); @@ -226,7 +226,7 @@ void Sapphire::Session::update() } -Sapphire::Entity::PlayerPtr Sapphire::Session::getPlayer() const +Sapphire::Entity::PlayerPtr Sapphire::World::Session::getPlayer() const { return m_pPlayer; } diff --git a/src/world/Session.h b/src/world/Session.h index c82fda41..910ee59e 100644 --- a/src/world/Session.h +++ b/src/world/Session.h @@ -5,69 +5,69 @@ #include "ForwardsZone.h" -namespace Sapphire { - -class Session : - public std::enable_shared_from_this< Session > +namespace Sapphire::World { -public: - Session( uint32_t sessionId ); - ~Session(); + class Session : public std::enable_shared_from_this< Session > + { + public: + Session( uint32_t sessionId ); - void setZoneConnection( Network::GameConnectionPtr zoneCon ); + ~Session(); - void setChatConnection( Network::GameConnectionPtr chatCon ); + void setZoneConnection( Network::GameConnectionPtr zoneCon ); - Network::GameConnectionPtr getZoneConnection() const; + void setChatConnection( Network::GameConnectionPtr chatCon ); - Network::GameConnectionPtr getChatConnection() const; + Network::GameConnectionPtr getZoneConnection() const; - int64_t getLastDataTime() const; + Network::GameConnectionPtr getChatConnection() const; - int64_t getLastSqlTime() const; + int64_t getLastDataTime() const; - void updateLastDataTime(); + int64_t getLastSqlTime() const; - void updateLastSqlTime(); + void updateLastDataTime(); - void startReplay( const std::string& folderpath ); + void updateLastSqlTime(); - void stopReplay(); + void startReplay( const std::string& folderpath ); - void processReplay(); + void stopReplay(); - void sendReplayInfo(); + void processReplay(); - void close(); + void sendReplayInfo(); - uint32_t getId() const; + void close(); - bool loadPlayer(); + uint32_t getId() const; - void update(); + bool loadPlayer(); - bool isValid() const; + void update(); - Entity::PlayerPtr getPlayer() const; + bool isValid() const; -private: - uint32_t m_sessionId; + Entity::PlayerPtr getPlayer() const; - Entity::PlayerPtr m_pPlayer; + private: + uint32_t m_sessionId; - int64_t m_lastDataTime; + Entity::PlayerPtr m_pPlayer; - int64_t m_lastSqlTime; - bool m_isValid; + int64_t m_lastDataTime; - bool m_isReplaying; - std::vector< std::tuple< uint64_t, std::string > > m_replayCache; + int64_t m_lastSqlTime; + bool m_isValid; - Network::GameConnectionPtr m_pZoneConnection; - Network::GameConnectionPtr m_pChatConnection; + bool m_isReplaying; + std::vector< std::tuple< uint64_t, std::string > > m_replayCache; -}; + Network::GameConnectionPtr m_pZoneConnection; + Network::GameConnectionPtr m_pChatConnection; + + }; } diff --git a/src/world/Territory/Zone.cpp b/src/world/Territory/Zone.cpp index eedbe037..3aaccd85 100644 --- a/src/world/Territory/Zone.cpp +++ b/src/world/Territory/Zone.cpp @@ -223,7 +223,7 @@ void Sapphire::Zone::pushActor( Entity::ActorPtr pActor ) { auto pPlayer = pActor->getAsPlayer(); - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = g_fw.get< World::ServerMgr >(); auto pSession = pServerZone->getSession( pPlayer->getId() ); if( pSession ) m_sessionSet.insert( pSession ); @@ -285,7 +285,7 @@ void Sapphire::Zone::queuePacketForRange( Entity::Player& sourcePlayer, uint32_t if( pTeriMgr->isPrivateTerritory( getTerritoryTypeId() ) ) return; - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = g_fw.get< World::ServerMgr >(); for( auto entry : m_playerMap ) { auto player = entry.second; @@ -311,7 +311,7 @@ void Sapphire::Zone::queuePacketForZone( Entity::Player& sourcePlayer, if( pTeriMgr->isPrivateTerritory( getTerritoryTypeId() ) ) return; - auto pServerZone = g_fw.get< ServerMgr >(); + auto pServerZone = g_fw.get< World::ServerMgr >(); for( auto entry : m_playerMap ) { auto player = entry.second; diff --git a/src/world/Territory/Zone.h b/src/world/Territory/Zone.h index 132b797d..2dbf08df 100644 --- a/src/world/Territory/Zone.h +++ b/src/world/Territory/Zone.h @@ -7,7 +7,7 @@ #include "Cell.h" #include "CellHandler.h" -#include "Forwards.h" +#include "ForwardsZone.h" #include #include @@ -19,11 +19,9 @@ namespace Sapphire { - class Session; - class ZonePosition; - using SessionSet = std::set< SessionPtr >; + using SessionSet = std::set< World::SessionPtr >; using FestivalPair = std::pair< uint16_t, uint16_t >; namespace Data diff --git a/src/world/mainGameServer.cpp b/src/world/mainGameServer.cpp index b2c110c3..e73fec68 100644 --- a/src/world/mainGameServer.cpp +++ b/src/world/mainGameServer.cpp @@ -12,7 +12,8 @@ using namespace Sapphire::World; bool setupFramework() { - auto pServer = std::make_shared< ServerMgr >( "config.ini" ); + auto pFramework = Sapphire::make_Framework(); + auto pServer = std::make_shared< ServerMgr >( "config.ini", pFramework ); g_fw.set< ServerMgr >( pServer ); return true; From f52588cdb21d188577003d2b912c4bc386f3965f Mon Sep 17 00:00:00 2001 From: Mordred Date: Sun, 23 Dec 2018 03:53:08 +0100 Subject: [PATCH 15/86] Progress... --- src/api/main.cpp | 66 +++--- src/common/Database/DbConnection.cpp | 14 +- src/common/Database/DbLoader.cpp | 12 +- src/common/Database/DbWorkerPool.cpp | 27 +-- src/common/Forwards.h | 2 + src/common/Logging/Logger.cpp | 9 +- src/common/Logging/Logger.h | 15 +- src/common/Network/Connection.cpp | 6 +- src/common/Network/Connection.h | 14 +- src/dbm/main.cpp | 45 ++-- src/lobby/GameConnection.cpp | 12 +- src/lobby/GameConnection.h | 2 +- src/lobby/ServerLobby.cpp | 202 +++++++++--------- src/scripts/quest/ManFst001.cpp | 6 +- src/scripts/quest/ManFst002.cpp | 6 +- src/scripts/quest/ManFst003.cpp | 6 +- src/scripts/quest/ManFst004.cpp | 6 +- src/scripts/quest/ManSea001.cpp | 6 +- src/scripts/quest/ManSea002.cpp | 6 +- src/scripts/quest/ManSea003.cpp | 6 +- src/scripts/quest/ManWil001.cpp | 6 +- src/scripts/quest/ManWil002.cpp | 6 +- .../quest/subquest/gridania/SubFst001.cpp | 6 +- .../quest/subquest/gridania/SubFst002.cpp | 6 +- .../quest/subquest/gridania/SubFst003.cpp | 6 +- .../quest/subquest/gridania/SubFst004.cpp | 6 +- .../quest/subquest/gridania/SubFst008.cpp | 6 +- .../quest/subquest/gridania/SubFst009.cpp | 6 +- .../quest/subquest/gridania/SubFst010.cpp | 6 +- .../quest/subquest/gridania/SubFst011.cpp | 6 +- .../quest/subquest/gridania/SubFst013.cpp | 9 +- .../quest/subquest/gridania/SubFst014.cpp | 6 +- .../quest/subquest/gridania/SubFst015.cpp | 6 +- .../quest/subquest/gridania/SubFst019.cpp | 6 +- .../quest/subquest/gridania/SubFst026.cpp | 6 +- .../quest/subquest/gridania/SubFst029.cpp | 6 +- .../quest/subquest/gridania/SubFst030.cpp | 6 +- .../quest/subquest/gridania/SubFst041.cpp | 6 +- .../quest/subquest/limsa/SubSea001.cpp | 6 +- .../quest/subquest/uldah/SubWil000.cpp | 6 +- .../quest/subquest/uldah/SubWil001.cpp | 6 +- .../quest/subquest/uldah/SubWil002.cpp | 6 +- .../quest/subquest/uldah/SubWil004.cpp | 6 +- .../quest/subquest/uldah/SubWil006.cpp | 6 +- .../quest/subquest/uldah/SubWil007.cpp | 9 +- .../quest/subquest/uldah/SubWil018.cpp | 6 +- .../quest/subquest/uldah/SubWil019.cpp | 6 +- .../quest/subquest/uldah/SubWil021.cpp | 6 +- .../quest/subquest/uldah/SubWil022.cpp | 6 +- .../quest/subquest/uldah/SubWil027.cpp | 6 +- .../quest/subquest/uldah/SubWil028.cpp | 6 +- .../quest/subquest/uldah/SubWil029.cpp | 6 +- src/tools/exd_common_gen/main.cpp | 11 +- src/tools/exd_struct_gen/main.cpp | 15 +- src/tools/exd_struct_test/main.cpp | 19 +- src/tools/mob_parse/main.cpp | 77 +++---- src/tools/quest_parser/main.cpp | 15 +- src/world/Action/EventAction.cpp | 6 +- src/world/Action/EventItemAction.cpp | 8 +- src/world/Actor/EventObject.cpp | 7 +- src/world/Actor/Player.cpp | 10 +- src/world/Actor/PlayerEvent.cpp | 12 +- src/world/Actor/PlayerInventory.cpp | 2 - src/world/Actor/PlayerSql.cpp | 7 +- src/world/Event/EventHelper.h | 15 -- src/world/Inventory/ItemContainer.cpp | 8 +- src/world/Manager/DebugCommandMgr.cpp | 23 +- .../EventHelper.cpp => Manager/EventMgr.cpp} | 22 +- src/world/Manager/EventMgr.h | 23 ++ src/world/Manager/TerritoryMgr.cpp | 44 ++-- src/world/Network/GameConnection.cpp | 79 +++---- src/world/Network/GameConnection.h | 7 +- src/world/Network/Handlers/ActionHandler.cpp | 9 +- src/world/Network/Handlers/CFHandlers.cpp | 25 +-- .../Network/Handlers/ClientTriggerHandler.cpp | 53 +++-- src/world/Network/Handlers/EventHandlers.cpp | 89 ++++---- .../Network/Handlers/GMCommandHandlers.cpp | 34 +-- .../Network/Handlers/InventoryHandler.cpp | 9 +- src/world/Network/Handlers/PacketHandlers.cpp | 103 +++++---- src/world/Script/NativeScriptApi.h | 2 +- src/world/Script/NativeScriptMgr.cpp | 18 +- src/world/Script/NativeScriptMgr.h | 7 +- src/world/Script/ScriptLoader.cpp | 36 ++-- src/world/Script/ScriptLoader.h | 19 ++ src/world/Script/ScriptMgr.cpp | 47 ++-- src/world/Script/ScriptMgr.h | 5 +- src/world/ServerMgr.cpp | 72 +++---- src/world/Session.cpp | 3 +- src/world/Territory/Cell.cpp | 2 - src/world/Territory/House.cpp | 2 +- .../Housing/HousingInteriorTerritory.cpp | 3 +- src/world/Territory/HousingZone.cpp | 3 +- src/world/Territory/InstanceContent.cpp | 21 +- src/world/Territory/Land.cpp | 4 +- src/world/Territory/Zone.cpp | 11 +- 95 files changed, 860 insertions(+), 793 deletions(-) delete mode 100644 src/world/Event/EventHelper.h rename src/world/{Event/EventHelper.cpp => Manager/EventMgr.cpp} (85%) create mode 100644 src/world/Manager/EventMgr.h diff --git a/src/api/main.cpp b/src/api/main.cpp index 7b2dff21..b52f7824 100644 --- a/src/api/main.cpp +++ b/src/api/main.cpp @@ -27,13 +27,13 @@ #include #include +#include #include "Forwards.h" #include "SapphireAPI.h" Sapphire::Framework g_fw; -Sapphire::Logger g_log; Sapphire::Db::DbWorkerPool< Sapphire::Db::ZoneDbConnection > g_charaDb; Sapphire::Data::ExdDataGenerated g_exdDataGen; Sapphire::Network::SapphireAPI g_sapphireAPI; @@ -41,6 +41,7 @@ Sapphire::Network::SapphireAPI g_sapphireAPI; namespace fs = std::experimental::filesystem; using namespace std; +using namespace Sapphire; using HttpServer = SimpleWeb::Server< SimpleWeb::HTTP >; using HttpClient = SimpleWeb::Client< SimpleWeb::HTTP >; @@ -64,17 +65,17 @@ void reloadConfig() void print_request_info( shared_ptr< HttpServer::Request > request ) { - g_log.info( "Request from " + request->remote_endpoint_address + " (" + request->path + ")" ); + Logger::info( "Request from " + request->remote_endpoint_address + " (" + request->path + ")" ); } bool loadSettings( int32_t argc, char* argv[] ) { - g_log.info( "Loading config " + configPath ); + Logger::info( "Loading config " + configPath ); if( !m_pConfig->loadConfig( configPath ) ) { - g_log.fatal( "Error loading config " + configPath ); - g_log.fatal( "If this is the first time starting the server, we've copied the default one for your editing pleasure." ); + Logger::fatal( "Error loading config " + configPath ); + Logger::fatal( "If this is the first time starting the server, we've copied the default one for your editing pleasure." ); return false; } @@ -135,17 +136,17 @@ bool loadSettings( int32_t argc, char* argv[] ) } catch( ... ) { - g_log.error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); - g_log.error( "Usage: \n" ); + Logger::error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); + Logger::error( "Usage: \n" ); } } - g_log.info( "Setting up generated EXD data" ); + Logger::info( "Setting up generated EXD data" ); auto dataPath = m_pConfig->getValue< std::string >( "GlobalParameters", "DataPath", "" ); if( !g_exdDataGen.init( dataPath ) ) { - g_log.fatal( "Error setting up generated EXD data. Make sure that DataPath is set correctly in config.ini" ); - g_log.fatal( "DataPath: " + dataPath ); + Logger::fatal( "Error setting up generated EXD data. Make sure that DataPath is set correctly in config.ini" ); + Logger::fatal( "DataPath: " + dataPath ); return false; } @@ -168,7 +169,7 @@ bool loadSettings( int32_t argc, char* argv[] ) m_pConfig->getValue< std::string >( "RestNetwork", "ListenPort", "80" ) ) ); server.config.address = m_pConfig->getValue< std::string >( "RestNetwork", "ListenIp", "0.0.0.0" ); - g_log.info( "Database: Connected to " + info.host + ":" + std::to_string( info.port ) ); + Logger::info( "Database: Connected to " + info.host + ":" + std::to_string( info.port ) ); return true; } @@ -279,7 +280,7 @@ void createAccount( shared_ptr< HttpServer::Response > response, shared_ptr< Htt catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -313,7 +314,7 @@ void login( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServer: catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -348,7 +349,7 @@ void deleteCharacter( shared_ptr< HttpServer::Response > response, shared_ptr< H catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -396,7 +397,7 @@ void createCharacter( shared_ptr< HttpServer::Response > response, shared_ptr< H catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -429,7 +430,7 @@ void insertSession( shared_ptr< HttpServer::Response > response, shared_ptr< Htt catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -464,7 +465,7 @@ void checkNameTaken( shared_ptr< HttpServer::Response > response, shared_ptr< Ht catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -506,7 +507,7 @@ void checkSession( shared_ptr< HttpServer::Response > response, shared_ptr< Http catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -536,7 +537,7 @@ void getNextCharId( shared_ptr< HttpServer::Response > response, shared_ptr< Htt catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -567,7 +568,7 @@ void getNextContentId( shared_ptr< HttpServer::Response > response, shared_ptr< catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -623,7 +624,7 @@ void getCharacterList( shared_ptr< HttpServer::Response > response, shared_ptr< catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -658,7 +659,7 @@ void get_init( shared_ptr< HttpServer::Response > response, shared_ptr< HttpServ catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -692,7 +693,7 @@ void get_headline_all( shared_ptr< HttpServer::Response > response, shared_ptr< catch( exception& e ) { *response << buildHttpResponse( 500 ); - g_log.error( e.what() ); + Logger::error( e.what() ); } } @@ -735,16 +736,13 @@ void defaultGet( shared_ptr< HttpServer::Response > response, shared_ptr< HttpSe int main( int argc, char* argv[] ) { - auto pLog = std::shared_ptr< Sapphire::Logger >( new Sapphire::Logger() ); - g_fw.set< Sapphire::Logger >( pLog ); - g_log.setLogPath( "log/SapphireAPI" ); - g_log.init(); + Logger::init( "log/SapphireAPI" ); - g_log.info( "===========================================================" ); - g_log.info( "Sapphire API Server " ); - g_log.info( "Version: 0.0.1" ); - g_log.info( "Compiled: " __DATE__ " " __TIME__ ); - g_log.info( "===========================================================" ); + Logger::info( "===========================================================" ); + Logger::info( "Sapphire API Server " ); + Logger::info( "Version: 0.0.1" ); + Logger::info( "Compiled: " __DATE__ " " __TIME__ ); + Logger::info( "===========================================================" ); if( !loadSettings( argc, argv ) ) throw std::exception(); @@ -771,8 +769,8 @@ int main( int argc, char* argv[] ) server.start(); } ); - g_log.info( "API server running on " + m_pConfig->getValue< std::string >( "RestNetwork", "ListenIp", "0.0.0.0" ) + ":" + - m_pConfig->getValue< std::string >( "RestNetwork", "ListenPort", "80" ) ); + Logger::info( "API server running on " + m_pConfig->getValue< std::string >( "RestNetwork", "ListenIp", "0.0.0.0" ) + ":" + + m_pConfig->getValue< std::string >( "RestNetwork", "ListenPort", "80" ) ); //Wait for server to start so that the client can connect this_thread::sleep_for( chrono::seconds( 1 ) ); diff --git a/src/common/Database/DbConnection.cpp b/src/common/Database/DbConnection.cpp index eb9c920e..eeb301a0 100644 --- a/src/common/Database/DbConnection.cpp +++ b/src/common/Database/DbConnection.cpp @@ -6,8 +6,6 @@ #include "PreparedStatement.h" #include "Framework.h" -extern Sapphire::Framework g_fw; - Sapphire::Db::DbConnection::DbConnection( ConnectionInfo& connInfo ) : m_reconnecting( false ), m_prepareError( false ), @@ -66,7 +64,7 @@ uint32_t Sapphire::Db::DbConnection::open() } catch( std::runtime_error& e ) { - g_fw.get< Logger >()->error( e.what() ); + Logger::error( e.what() ); return 1; } @@ -118,7 +116,7 @@ bool Sapphire::Db::DbConnection::execute( const std::string& sql ) } catch( std::runtime_error& e ) { - g_fw.get< Logger >()->error( e.what() ); + Logger::error( e.what() ); return false; } } @@ -133,7 +131,7 @@ std::shared_ptr< Mysql::ResultSet > Sapphire::Db::DbConnection::query( const std } catch( std::runtime_error& e ) { - g_fw.get< Logger >()->error( e.what() ); + Logger::error( e.what() ); return nullptr; } } @@ -170,7 +168,7 @@ Sapphire::Db::DbConnection::query( std::shared_ptr< Sapphire::Db::PreparedStatem } catch( std::runtime_error& e ) { - g_fw.get< Logger >()->error( e.what() ); + Logger::error( e.what() ); return nullptr; } @@ -196,7 +194,7 @@ bool Sapphire::Db::DbConnection::execute( std::shared_ptr< Sapphire::Db::Prepare } catch( std::runtime_error& e ) { - g_fw.get< Logger >()->error( e.what() ); + Logger::error( e.what() ); return false; } } @@ -232,7 +230,7 @@ void Sapphire::Db::DbConnection::prepareStatement( uint32_t index, const std::st } catch( std::runtime_error& e ) { - g_fw.get< Logger >()->error( e.what() ); + Logger::error( e.what() ); m_prepareError = true; } diff --git a/src/common/Database/DbLoader.cpp b/src/common/Database/DbLoader.cpp index 5479874e..1d6b52be 100644 --- a/src/common/Database/DbLoader.cpp +++ b/src/common/Database/DbLoader.cpp @@ -3,9 +3,6 @@ #include "ZoneDbConnection.h" #include "DbWorkerPool.h" #include "Logging/Logger.h" -#include "Framework.h" - -extern Sapphire::Framework g_fw; Sapphire::Db::DbLoader::DbLoader() { @@ -17,14 +14,12 @@ Sapphire::Db::DbLoader& Sapphire::Db::DbLoader::addDb( Sapphire::Db::DbWorkerPoo m_open.push( [ this, info, &pool ]()->bool { - - auto pLog = g_fw.get< Logger >(); const uint8_t asyncThreads = info.asyncThreads; const uint8_t synchThreads = info.syncThreads; if( asyncThreads < 1 || asyncThreads > 32 ) { - pLog->error( + Logger::error( "database: invalid number of worker threads specified. Please pick a value between 1 and 32." ); return false; } @@ -40,7 +35,7 @@ Sapphire::Db::DbLoader& Sapphire::Db::DbLoader::addDb( Sapphire::Db::DbWorkerPoo if( error ) { - pLog->error( "DatabasePool failed to open." ); + Logger::error( "DatabasePool failed to open." ); return false; } } @@ -55,8 +50,7 @@ Sapphire::Db::DbLoader& Sapphire::Db::DbLoader::addDb( Sapphire::Db::DbWorkerPoo { if( !pool.prepareStatements() ) { - auto pLog = g_fw.get< Logger >(); - pLog->error( "Could not prepare statements of the database, see log for details." ); + Logger::error( "Could not prepare statements of the database, see log for details." ); return false; } return true; diff --git a/src/common/Database/DbWorkerPool.cpp b/src/common/Database/DbWorkerPool.cpp index 9d154967..2b07acca 100644 --- a/src/common/Database/DbWorkerPool.cpp +++ b/src/common/Database/DbWorkerPool.cpp @@ -10,8 +10,6 @@ #include "Logging/Logger.h" #include -extern Sapphire::Framework g_fw; - class PingOperation : public Sapphire::Db::Operation { @@ -23,8 +21,7 @@ class PingOperation : }; template< class T > -Sapphire::Db::DbWorkerPool< T >::DbWorkerPool() - : +Sapphire::Db::DbWorkerPool< T >::DbWorkerPool() : m_queue( new Sapphire::LockedWaitQueue< std::shared_ptr< Operation > >() ), m_asyncThreads( 0 ), m_synchThreads( 0 ) @@ -39,8 +36,8 @@ Sapphire::Db::DbWorkerPool< T >::~DbWorkerPool() template< class T > void Sapphire::Db::DbWorkerPool< T >::setConnectionInfo( const ConnectionInfo& info, - uint8_t asyncThreads, - uint8_t synchThreads ) + uint8_t asyncThreads, + uint8_t synchThreads ) { m_connectionInfo = info; m_asyncThreads = asyncThreads; @@ -50,10 +47,9 @@ void Sapphire::Db::DbWorkerPool< T >::setConnectionInfo( const ConnectionInfo& i template< class T > uint32_t Sapphire::Db::DbWorkerPool< T >::open() { - auto pLog = g_fw.get< Logger >(); - pLog->info( "[DbPool] Opening DatabasePool " + getDatabaseName() + - " Asynchronous connections: " + std::to_string( m_asyncThreads ) + - " Synchronous connections: " + std::to_string( m_synchThreads ) ); + Logger::info( "[DbPool] Opening DatabasePool " + getDatabaseName() + + " Asynchronous connections: " + std::to_string( m_asyncThreads ) + + " Synchronous connections: " + std::to_string( m_synchThreads ) ); uint32_t error = openConnections( IDX_ASYNC, m_asyncThreads ); @@ -64,9 +60,9 @@ uint32_t Sapphire::Db::DbWorkerPool< T >::open() if( !error ) { - pLog->info( "[DbPool] DatabasePool " + getDatabaseName() + " opened successfully. " + - std::to_string( ( m_connections[ IDX_SYNCH ].size() + m_connections[ IDX_ASYNC ].size() ) ) + - " total connections running." ); + Logger::info( "[DbPool] DatabasePool " + getDatabaseName() + " opened successfully. " + + std::to_string( ( m_connections[ IDX_SYNCH ].size() + m_connections[ IDX_ASYNC ].size() ) ) + + " total connections running." ); } return error; @@ -75,11 +71,10 @@ uint32_t Sapphire::Db::DbWorkerPool< T >::open() template< class T > void Sapphire::Db::DbWorkerPool< T >::close() { - auto pLog = g_fw.get< Logger >(); - pLog->info( "[DbPool] Closing down DatabasePool " + getDatabaseName() ); + Logger::info( "[DbPool] Closing down DatabasePool " + getDatabaseName() ); m_connections[ IDX_ASYNC ].clear(); m_connections[ IDX_SYNCH ].clear(); - pLog->info( "[DbPool] All connections on DatabasePool " + getDatabaseName() + "closed." ); + Logger::info( "[DbPool] All connections on DatabasePool " + getDatabaseName() + "closed." ); } template< class T > diff --git a/src/common/Forwards.h b/src/common/Forwards.h index 797b70fe..1746b883 100644 --- a/src/common/Forwards.h +++ b/src/common/Forwards.h @@ -8,6 +8,8 @@ namespace Sapphire class ConfigMgr; using ConfigMgrPtr = std::shared_ptr< ConfigMgr >; + class Framework; + using FrameworkPtr = std::shared_ptr< Framework >; namespace Network { diff --git a/src/common/Logging/Logger.cpp b/src/common/Logging/Logger.cpp index 2282641f..1a599551 100644 --- a/src/common/Logging/Logger.cpp +++ b/src/common/Logging/Logger.cpp @@ -23,7 +23,7 @@ namespace Sapphire } - void Logger::setLogPath( const std::string& logPath ) + void Logger::init( const std::string& logPath ) { auto pos = logPath.find_last_of( '/' ); @@ -33,15 +33,10 @@ namespace Sapphire fs::create_directories( realPath ); } - m_logFile = logPath; - } - - void Logger::init() - { spdlog::init_thread_pool( 8192, 1 ); auto stdout_sink = std::make_shared< spdlog::sinks::stdout_color_sink_mt >(); - auto daily_sink = std::make_shared< spdlog::sinks::daily_file_sink_mt >( m_logFile + ".log", 0, 0 ); + auto daily_sink = std::make_shared< spdlog::sinks::daily_file_sink_mt >( logPath + ".log", 0, 0 ); std::vector< spdlog::sink_ptr > sinks { stdout_sink, daily_sink }; diff --git a/src/common/Logging/Logger.h b/src/common/Logging/Logger.h index 8c48aa69..876fadc3 100644 --- a/src/common/Logging/Logger.h +++ b/src/common/Logging/Logger.h @@ -11,23 +11,20 @@ namespace Sapphire private: std::string m_logFile; - - public: Logger(); - ~Logger(); - void init(); + public: - void error( const std::string& text ); + static void init( const std::string& logPath ); - void info( const std::string& text ); + static void error( const std::string& text ); - void debug( const std::string& text ); + static void info( const std::string& text ); - void fatal( const std::string& text ); + static void debug( const std::string& text ); - void setLogPath( const std::string& logPath ); + static void fatal( const std::string& text ); }; diff --git a/src/common/Network/Connection.cpp b/src/common/Network/Connection.cpp index 357155b6..c23165df 100644 --- a/src/common/Network/Connection.cpp +++ b/src/common/Network/Connection.cpp @@ -1,17 +1,19 @@ #include "Connection.h" #include "Hive.h" #include +#include "Framework.h" namespace Sapphire { namespace Network { //----------------------------------------------------------------------------- -Connection::Connection( HivePtr hive ) : +Connection::Connection( HivePtr hive, FrameworkPtr pFw ) : m_hive( hive ), m_socket( hive->GetService() ), m_io_strand( hive->GetService() ), m_receive_buffer_size( 32000 ), - m_error_state( 0 ) + m_error_state( 0 ), + m_pFw( pFw ) { } diff --git a/src/common/Network/Connection.h b/src/common/Network/Connection.h index 84aa76c7..72f23a0d 100644 --- a/src/common/Network/Connection.h +++ b/src/common/Network/Connection.h @@ -12,6 +12,12 @@ #include "Acceptor.h" #include +namespace Sapphire +{ + class Framework; + using FrameworkPtr = std::shared_ptr< Framework >; +} + namespace Sapphire::Network { @@ -38,9 +44,9 @@ namespace Sapphire::Network std::list< std::vector< uint8_t > > m_pending_sends; int32_t m_receive_buffer_size; std::atomic< uint32_t > m_error_state; + Sapphire::FrameworkPtr m_pFw; - - Connection( HivePtr hive ); + Connection( HivePtr hive, FrameworkPtr pFw ); virtual ~Connection(); @@ -144,13 +150,13 @@ namespace Sapphire::Network //----------------------------------------------------------------------------- template< class T > - std::shared_ptr< T > addServerToHive( const std::string& listenIp, uint32_t port, HivePtr pHive ) + std::shared_ptr< T > addServerToHive( const std::string& listenIp, uint32_t port, HivePtr pHive, FrameworkPtr pFw ) { try { AcceptorPtr acceptor( new Acceptor( pHive ) ); acceptor->Listen( listenIp, port ); - std::shared_ptr< T > connection( new T( pHive, acceptor ) ); + std::shared_ptr< T > connection( new T( pHive, acceptor, pFw ) ); acceptor->Accept( connection ); return connection; } diff --git a/src/dbm/main.cpp b/src/dbm/main.cpp index 378103c8..6cce2ac4 100644 --- a/src/dbm/main.cpp +++ b/src/dbm/main.cpp @@ -16,7 +16,7 @@ namespace filesys = std::experimental::filesystem; #include "DbManager.h" -Sapphire::Logger g_log; +using namespace Sapphire; std::vector< std::string > getAllFilesInDir( const std::string& dirPath, const std::vector< std::string > dirSkipList = {} ) @@ -77,20 +77,20 @@ std::string delChar( std::string &str, char del ) void printUsage() { - g_log.info( " Usage: sapphire_dbm " ); - g_log.info( "\t --mode" ); - g_log.info( "\t\t initialize -> Creates DB if not present and inserts default tables/data" ); - g_log.info( "\t\t check -> Checks if Sapphire DB-Version matches your DB-Version" ); - g_log.info( "\t\t update -> Updates your DB-Version to Sapphire DB-Version" ); - g_log.info( "\t\t clearchars -> Removes all character data from DB. Accounts will stay untouched" ); - g_log.info( "\t\t liquidate -> Removes all tables and deletes the DB" ); - g_log.info( "\t --user " ); - g_log.info( "\t --pass ( default empty )" ); - g_log.info( "\t --host ( default 127.0.0.1 )" ); - g_log.info( "\t --port ( default 3306 )" ); - g_log.info( "\t --database " ); - g_log.info( "\t --sfile ( default sql/schema/schema.sql )" ); - g_log.info( "\t --force ( skips user input / auto Yes )" ); + Logger::info( " Usage: sapphire_dbm " ); + Logger::info( "\t --mode" ); + Logger::info( "\t\t initialize -> Creates DB if not present and inserts default tables/data" ); + Logger::info( "\t\t check -> Checks if Sapphire DB-Version matches your DB-Version" ); + Logger::info( "\t\t update -> Updates your DB-Version to Sapphire DB-Version" ); + Logger::info( "\t\t clearchars -> Removes all character data from DB. Accounts will stay untouched" ); + Logger::info( "\t\t liquidate -> Removes all tables and deletes the DB" ); + Logger::info( "\t --user " ); + Logger::info( "\t --pass ( default empty )" ); + Logger::info( "\t --host ( default 127.0.0.1 )" ); + Logger::info( "\t --port ( default 3306 )" ); + Logger::info( "\t --database " ); + Logger::info( "\t --sfile ( default sql/schema/schema.sql )" ); + Logger::info( "\t --force ( skips user input / auto Yes )" ); } int main( int32_t argc, char* argv[] ) @@ -104,8 +104,7 @@ int main( int32_t argc, char* argv[] ) std::string database; std::string pass; - g_log.setLogPath( "log/SapphireDbm" ); - g_log.init(); + Logger::init( "log/SapphireDbm" ); std::string sFile; std::string iFile; @@ -181,23 +180,23 @@ int main( int32_t argc, char* argv[] ) } else { - g_log.fatal( "Not a valid mode: " + mode + " !" ); + Logger::fatal( "Not a valid mode: " + mode + " !" ); return 1; } - g_log.info( "Launching in " + mode + " mode..." ); + Logger::info( "Launching in " + mode + " mode..." ); if( !dbm.connect() ) { - g_log.fatal( "Could not connect to server!" ); - g_log.fatal( dbm.getLastError() ); + Logger::fatal( "Could not connect to server!" ); + Logger::fatal( dbm.getLastError() ); return 1; } if( !dbm.performAction() ) { - g_log.fatal( "Could not perform action!" ); - g_log.fatal( dbm.getLastError() ); + Logger::fatal( "Could not perform action!" ); + Logger::fatal( dbm.getLastError() ); return 1; } diff --git a/src/lobby/GameConnection.cpp b/src/lobby/GameConnection.cpp index 3f5e861e..c6485ef6 100644 --- a/src/lobby/GameConnection.cpp +++ b/src/lobby/GameConnection.cpp @@ -24,9 +24,11 @@ using namespace Sapphire::Network::Packets; using namespace Sapphire::Network::Packets::Server; Sapphire::Network::GameConnection::GameConnection( Sapphire::Network::HivePtr pHive, - Sapphire::Network::AcceptorPtr pAcceptor ) - : - Connection( pHive ), m_pAcceptor( pAcceptor ), m_bEncryptionInitialized( false ) + Sapphire::Network::AcceptorPtr pAcceptor, + FrameworkPtr pFw ) : + Connection( pHive, pFw ), + m_pAcceptor( pAcceptor ), + m_bEncryptionInitialized( false ) { } @@ -39,7 +41,7 @@ Sapphire::Network::GameConnection::~GameConnection() // overwrite the parents onConnect for our game socket needs void Sapphire::Network::GameConnection::OnAccept( const std::string& host, uint16_t port ) { - auto connection = make_GameConnection( m_hive, m_pAcceptor ); + auto connection = make_GameConnection( m_hive, m_pAcceptor, m_pFw ); m_pAcceptor->Accept( connection ); g_log.info( "Connect from " + m_socket.remote_endpoint().address().to_string() ); @@ -473,7 +475,7 @@ void Sapphire::Network::GameConnection::generateEncryptionKey( uint32_t key, con } void Sapphire::Network::GameConnection::handlePackets( const Sapphire::Network::Packets::FFXIVARR_PACKET_HEADER& ipcHeader, - const std::vector< Sapphire::Network::Packets::FFXIVARR_PACKET_RAW >& packetData ) + const std::vector< Sapphire::Network::Packets::FFXIVARR_PACKET_RAW >& packetData ) { for( auto inPacket : packetData ) diff --git a/src/lobby/GameConnection.h b/src/lobby/GameConnection.h index d4626407..20945c7f 100644 --- a/src/lobby/GameConnection.h +++ b/src/lobby/GameConnection.h @@ -40,7 +40,7 @@ namespace Sapphire::Network LockedQueue< Packets::GamePacketPtr > m_outQueue; public: - GameConnection( HivePtr pHive, AcceptorPtr pAcceptor ); + GameConnection( HivePtr pHive, AcceptorPtr pAcceptor, FrameworkPtr pFw ); ~GameConnection(); diff --git a/src/lobby/ServerLobby.cpp b/src/lobby/ServerLobby.cpp index e084889a..dcdacee1 100644 --- a/src/lobby/ServerLobby.cpp +++ b/src/lobby/ServerLobby.cpp @@ -10,7 +10,7 @@ #include #include -//#include "LobbySession.h" +#include "Framework.h" #include "ServerLobby.h" @@ -21,124 +21,124 @@ #include -Sapphire::Logger g_log; Sapphire::Network::RestConnector g_restConnector; -namespace Sapphire { - - -ServerLobby::ServerLobby( const std::string& configPath ) : - m_configPath( configPath ), - m_numConnections( 0 ) +namespace Sapphire { - m_pConfig = std::shared_ptr< ConfigMgr >( new ConfigMgr ); -} -ServerLobby::~ServerLobby( void ) -{ -} -LobbySessionPtr ServerLobby::getSession( char* sessionId ) -{ - return g_restConnector.getSession( sessionId ); -} - -ConfigMgrPtr ServerLobby::getConfig() const -{ - return m_pConfig; -} - -void ServerLobby::run( int32_t argc, char* argv[] ) -{ - g_log.setLogPath( "log/SapphireLobby" ); - g_log.init(); - - g_log.info( "===========================================================" ); - g_log.info( "Sapphire Server Project " ); - g_log.info( "Version: " + Version::VERSION ); - g_log.info( "Git Hash: " + Version::GIT_HASH ); - g_log.info( "Compiled: " __DATE__ " " __TIME__ ); - g_log.info( "===========================================================" ); - - if( !loadSettings( argc, argv ) ) + ServerLobby::ServerLobby( const std::string& configPath ) : + m_configPath( configPath ), + m_numConnections( 0 ) { - g_log.fatal( "Error loading settings! " ); - return; + m_pConfig = std::shared_ptr< ConfigMgr >( new ConfigMgr ); } - Network::HivePtr hive( new Network::Hive() ); - Network::addServerToHive< Network::GameConnection >( m_ip, m_port, hive ); - - g_log.info( - "Lobby server running on " + m_pConfig->getValue< std::string >( "LobbyNetwork", "ListenIp", "0.0.0.0" ) + ":" + - m_pConfig->getValue< std::string >( "LobbyNetwork", "ListenPort", "80" ) ); - - std::vector< std::thread > threadGroup; - - threadGroup.emplace_back( std::bind( &Network::Hive::Run, hive.get() ) ); - - for( auto& thread : threadGroup ) - if( thread.joinable() ) - thread.join(); - -} - -bool ServerLobby::loadSettings( int32_t argc, char* argv[] ) -{ - g_log.info( "Loading config " + m_configPath ); - - if( !m_pConfig->loadConfig( m_configPath ) ) + ServerLobby::~ServerLobby( void ) { - g_log.fatal( "Error loading config " + m_configPath ); - g_log.fatal( "If this is the first time starting the server, we've copied the default one for your editing pleasure." ); - return false; } - std::vector< std::string > args( argv + 1, argv + argc ); - for( size_t i = 0; i + 1 < args.size(); i += 2 ) - { - std::string arg( "" ); - std::string val( "" ); - try + LobbySessionPtr ServerLobby::getSession( char* sessionId ) + { + return g_restConnector.getSession( sessionId ); + } + + ConfigMgrPtr ServerLobby::getConfig() const + { + return m_pConfig; + } + + void ServerLobby::run( int32_t argc, char* argv[] ) + { + Logger::init( "log/SapphireLobby" ); + + Logger::info( "===========================================================" ); + Logger::info( "Sapphire Server Project " ); + Logger::info( "Version: " + Version::VERSION ); + Logger::info( "Git Hash: " + Version::GIT_HASH ); + Logger::info( "Compiled: " __DATE__ " " __TIME__ ); + Logger::info( "===========================================================" ); + + if( !loadSettings( argc, argv ) ) { - std::transform( arg.begin(), arg.end(), arg.begin(), [](unsigned char c){ return std::tolower( c ); } ); - val = std::string( args[ i + 1 ] ); + Logger::fatal( "Error loading settings! " ); + return; + } - // trim '-' from start of arg - arg = arg.erase( 0, arg.find_first_not_of( '-' ) ); + auto pFw = std::make_shared< Framework >(); + Network::HivePtr hive( new Network::Hive() ); + Network::addServerToHive< Network::GameConnection >( m_ip, m_port, hive, pFw ); - if( arg == "ip" ) + Logger::info( + "Lobby server running on " + m_pConfig->getValue< std::string >( "LobbyNetwork", "ListenIp", "0.0.0.0" ) + ":" + + m_pConfig->getValue< std::string >( "LobbyNetwork", "ListenPort", "80" ) ); + + std::vector< std::thread > threadGroup; + + threadGroup.emplace_back( std::bind( &Network::Hive::Run, hive.get() ) ); + + for( auto& thread : threadGroup ) + if( thread.joinable() ) + thread.join(); + + } + + bool ServerLobby::loadSettings( int32_t argc, char* argv[] ) + { + Logger::info( "Loading config " + m_configPath ); + + if( !m_pConfig->loadConfig( m_configPath ) ) + { + Logger::fatal( "Error loading config " + m_configPath ); + Logger::fatal( "If this is the first time starting the server, we've copied the default one for your editing pleasure." ); + return false; + } + std::vector< std::string > args( argv + 1, argv + argc ); + for( size_t i = 0; i + 1 < args.size(); i += 2 ) + { + std::string arg( "" ); + std::string val( "" ); + + try { - // todo: ip addr in config - m_pConfig->setValue< std::string >( "LobbyNetwork.ListenIp", val ); + std::transform( arg.begin(), arg.end(), arg.begin(), [](unsigned char c){ return std::tolower( c ); } ); + val = std::string( args[ i + 1 ] ); + + // trim '-' from start of arg + arg = arg.erase( 0, arg.find_first_not_of( '-' ) ); + + if( arg == "ip" ) + { + // todo: ip addr in config + m_pConfig->setValue< std::string >( "LobbyNetwork.ListenIp", val ); + } + else if( arg == "p" || arg == "port" ) + { + m_pConfig->setValue< std::string >( "LobbyNetwork.LobbyPort", val ); + } + else if( arg == "worldip" || arg == "worldip" ) + { + m_pConfig->setValue< std::string >( "GlobalNetwork.ZoneHost", val ); + } + else if( arg == "worldport" ) + { + m_pConfig->setValue< std::string >( "GlobalNetwork.ZonePort", val ); + } } - else if( arg == "p" || arg == "port" ) + catch( ... ) { - m_pConfig->setValue< std::string >( "LobbyNetwork.LobbyPort", val ); - } - else if( arg == "worldip" || arg == "worldip" ) - { - m_pConfig->setValue< std::string >( "GlobalNetwork.ZoneHost", val ); - } - else if( arg == "worldport" ) - { - m_pConfig->setValue< std::string >( "GlobalNetwork.ZonePort", val ); + Logger::error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); + Logger::error( "Usage: \n" ); } } - catch( ... ) - { - g_log.error( "Error parsing argument: " + arg + " " + "value: " + val + "\n" ); - g_log.error( "Usage: \n" ); - } + + m_port = m_pConfig->getValue< uint16_t >( "LobbyNetwork", "ListenPort", 54994 ); + m_ip = m_pConfig->getValue< std::string >( "LobbyNetwork", "ListenIp", "0.0.0.0" ); + + g_restConnector.restHost = m_pConfig->getValue< std::string >( "GlobalNetwork", "RestHost" ) + ":" + + m_pConfig->getValue< std::string >( "GlobalNetwork", "RestPort" ); + g_restConnector.serverSecret = m_pConfig->getValue< std::string >( "GlobalParameters", "ServerSecret" ); + + return true; } - - m_port = m_pConfig->getValue< uint16_t >( "LobbyNetwork", "ListenPort", 54994 ); - m_ip = m_pConfig->getValue< std::string >( "LobbyNetwork", "ListenIp", "0.0.0.0" ); - - g_restConnector.restHost = m_pConfig->getValue< std::string >( "GlobalNetwork", "RestHost" ) + ":" + - m_pConfig->getValue< std::string >( "GlobalNetwork", "RestPort" ); - g_restConnector.serverSecret = m_pConfig->getValue< std::string >( "GlobalParameters", "ServerSecret" ); - - return true; -} } diff --git a/src/scripts/quest/ManFst001.cpp b/src/scripts/quest/ManFst001.cpp index a6a1fc7f..3998ae38 100644 --- a/src/scripts/quest/ManFst001.cpp +++ b/src/scripts/quest/ManFst001.cpp @@ -1,7 +1,8 @@ #include #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include "Event/EventHandler.h" +#include "Framework.h" // Quest Script: ManFst001_00039 // Quest Name: Coming to Gridania @@ -95,7 +96,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) Scene00000( player ); diff --git a/src/scripts/quest/ManFst002.cpp b/src/scripts/quest/ManFst002.cpp index 7f892de4..7d3fdc53 100644 --- a/src/scripts/quest/ManFst002.cpp +++ b/src/scripts/quest/ManFst002.cpp @@ -1,7 +1,8 @@ #include #include #include "Event/EventHandler.h" -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" +#include "Framework.h" // Quest Script: ManFst002_00124 // Quest Name: Close to Home @@ -192,7 +193,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) Scene00000( player ); diff --git a/src/scripts/quest/ManFst003.cpp b/src/scripts/quest/ManFst003.cpp index 640b6107..4fd91806 100644 --- a/src/scripts/quest/ManFst003.cpp +++ b/src/scripts/quest/ManFst003.cpp @@ -1,6 +1,7 @@ #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include +#include "Framework.h" // Quest Script: ManFst003_00123 // Quest Name: Close to Home @@ -81,7 +82,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) { diff --git a/src/scripts/quest/ManFst004.cpp b/src/scripts/quest/ManFst004.cpp index e9e59439..f3738813 100644 --- a/src/scripts/quest/ManFst004.cpp +++ b/src/scripts/quest/ManFst004.cpp @@ -1,6 +1,7 @@ #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include +#include "Framework.h" // Quest Script: ManFst004_00124 // Quest Name: Close to Home @@ -81,7 +82,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ManFst004::Actor0 ) { diff --git a/src/scripts/quest/ManSea001.cpp b/src/scripts/quest/ManSea001.cpp index db0e5628..c22ff0f7 100644 --- a/src/scripts/quest/ManSea001.cpp +++ b/src/scripts/quest/ManSea001.cpp @@ -1,6 +1,7 @@ #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include +#include "Framework.h" // Quest Script: ManSea001_00107 // Quest Name: Coming to Limsa Lominsa @@ -141,7 +142,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) Scene00000( player ); diff --git a/src/scripts/quest/ManSea002.cpp b/src/scripts/quest/ManSea002.cpp index c2fd2f37..692e4d25 100644 --- a/src/scripts/quest/ManSea002.cpp +++ b/src/scripts/quest/ManSea002.cpp @@ -1,6 +1,7 @@ #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include +#include "Framework.h" // Quest Script: ManSea002_00108 // Quest Name: Close to Home @@ -47,7 +48,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) { diff --git a/src/scripts/quest/ManSea003.cpp b/src/scripts/quest/ManSea003.cpp index f340937c..0f213e3f 100644 --- a/src/scripts/quest/ManSea003.cpp +++ b/src/scripts/quest/ManSea003.cpp @@ -1,6 +1,7 @@ #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include +#include "Framework.h" // Quest Script: ManSea003_00109 // Quest Name: Close to Home @@ -63,7 +64,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) { diff --git a/src/scripts/quest/ManWil001.cpp b/src/scripts/quest/ManWil001.cpp index cd9e3974..5c0de2b6 100644 --- a/src/scripts/quest/ManWil001.cpp +++ b/src/scripts/quest/ManWil001.cpp @@ -1,6 +1,7 @@ #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include +#include "Framework.h" // Quest Script: ManWil001_00594 // Quest Name: Coming to Ul'dah @@ -173,7 +174,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) { diff --git a/src/scripts/quest/ManWil002.cpp b/src/scripts/quest/ManWil002.cpp index b2dd4db6..ddf46067 100644 --- a/src/scripts/quest/ManWil002.cpp +++ b/src/scripts/quest/ManWil002.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" // Quest Script: ManWil002_00568 // Quest Name: Close to Home @@ -69,7 +70,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst001.cpp b/src/scripts/quest/subquest/gridania/SubFst001.cpp index 45c2bbf6..ee0a9c48 100644 --- a/src/scripts/quest/subquest/gridania/SubFst001.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst001.cpp @@ -1,6 +1,7 @@ #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include +#include "Framework.h" using namespace Sapphire; @@ -72,7 +73,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst002.cpp b/src/scripts/quest/subquest/gridania/SubFst002.cpp index 85722cde..d539d591 100644 --- a/src/scripts/quest/subquest/gridania/SubFst002.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst002.cpp @@ -1,6 +1,7 @@ #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include +#include "Framework.h" using namespace Sapphire; @@ -58,7 +59,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 && !player.hasQuest( getId() ) ) Scene00000( player ); diff --git a/src/scripts/quest/subquest/gridania/SubFst003.cpp b/src/scripts/quest/subquest/gridania/SubFst003.cpp index e5d0aca7..d32ca94f 100644 --- a/src/scripts/quest/subquest/gridania/SubFst003.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst003.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -51,7 +52,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst004.cpp b/src/scripts/quest/subquest/gridania/SubFst004.cpp index 7cf1a84d..53923c3f 100644 --- a/src/scripts/quest/subquest/gridania/SubFst004.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst004.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -55,7 +56,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst008.cpp b/src/scripts/quest/subquest/gridania/SubFst008.cpp index c0193abc..d5828c7c 100644 --- a/src/scripts/quest/subquest/gridania/SubFst008.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst008.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -55,7 +56,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst009.cpp b/src/scripts/quest/subquest/gridania/SubFst009.cpp index 0542f689..4d536487 100644 --- a/src/scripts/quest/subquest/gridania/SubFst009.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst009.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -51,7 +52,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst010.cpp b/src/scripts/quest/subquest/gridania/SubFst010.cpp index a8a2defe..c6fd5854 100644 --- a/src/scripts/quest/subquest/gridania/SubFst010.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst010.cpp @@ -1,6 +1,7 @@ #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" #include +#include "Framework.h" using namespace Sapphire; @@ -54,7 +55,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR0 ) Scene00000( player ); diff --git a/src/scripts/quest/subquest/gridania/SubFst011.cpp b/src/scripts/quest/subquest/gridania/SubFst011.cpp index ceadb3d4..a452c161 100644 --- a/src/scripts/quest/subquest/gridania/SubFst011.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst011.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -48,7 +49,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && !player.hasQuest( getId() ) ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst013.cpp b/src/scripts/quest/subquest/gridania/SubFst013.cpp index e813acab..5f485542 100644 --- a/src/scripts/quest/subquest/gridania/SubFst013.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst013.cpp @@ -1,6 +1,7 @@ #include #include -#include "Event/EventHelper.h" +#include "Manager/EventMgr.h" +#include "Framework.h" using namespace Sapphire; @@ -160,7 +161,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( !player.hasQuest( getId() ) ) { @@ -180,7 +182,8 @@ public: void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == ACTOR1 && emoteId == 5 && player.getQuestSeq( getId() ) == SEQ_1 ) Scene00100( player ); diff --git a/src/scripts/quest/subquest/gridania/SubFst014.cpp b/src/scripts/quest/subquest/gridania/SubFst014.cpp index 735f54a0..640f0f9d 100644 --- a/src/scripts/quest/subquest/gridania/SubFst014.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst014.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -55,7 +56,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && !player.hasQuest( getId() ) ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst015.cpp b/src/scripts/quest/subquest/gridania/SubFst015.cpp index bd0aa913..43edea60 100644 --- a/src/scripts/quest/subquest/gridania/SubFst015.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst015.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -53,7 +54,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && !player.hasQuest( getId() ) ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst019.cpp b/src/scripts/quest/subquest/gridania/SubFst019.cpp index 51701057..dff3948e 100644 --- a/src/scripts/quest/subquest/gridania/SubFst019.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst019.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -48,7 +49,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst026.cpp b/src/scripts/quest/subquest/gridania/SubFst026.cpp index e5136621..a9733538 100644 --- a/src/scripts/quest/subquest/gridania/SubFst026.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst026.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -50,7 +51,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && !player.hasQuest( getId() ) ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst029.cpp b/src/scripts/quest/subquest/gridania/SubFst029.cpp index d2d6d65a..7f765458 100644 --- a/src/scripts/quest/subquest/gridania/SubFst029.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst029.cpp @@ -1,6 +1,7 @@ #include -#include +#include #include +#include "Framework.h" using namespace Sapphire; @@ -46,7 +47,8 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == SubFst029::Actor0 && !player.hasQuest( getId() ) ) { diff --git a/src/scripts/quest/subquest/gridania/SubFst030.cpp b/src/scripts/quest/subquest/gridania/SubFst030.cpp index 9f7dedfe..4f789edf 100644 --- a/src/scripts/quest/subquest/gridania/SubFst030.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst030.cpp @@ -1,7 +1,8 @@ #include @@ -79,7 +87,7 @@
From 50276dcbc3220e571a972029b75c8a18de0ea740 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 30 Dec 2018 17:44:03 +1100 Subject: [PATCH 64/86] #448 - remove deed on build --- src/common/Common.h | 2 +- src/world/Actor/Player.h | 2 +- src/world/Actor/PlayerInventory.cpp | 21 ++++++++++ src/world/Manager/HousingMgr.cpp | 41 ++++++++++++------- src/world/Manager/HousingMgr.h | 2 +- src/world/Territory/House.cpp | 4 +- src/world/Territory/House.h | 4 +- .../Housing/HousingInteriorTerritory.cpp | 2 +- 8 files changed, 56 insertions(+), 22 deletions(-) diff --git a/src/common/Common.h b/src/common/Common.h index 29296509..9363426d 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -791,7 +791,7 @@ namespace Sapphire::Common ExteriorFence }; - enum HousingInteriorSlot + enum HouseInteriorSlot { InteriorWall, InteriorFloor, diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index ce11587c..2721bba2 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -916,7 +916,7 @@ namespace Sapphire::Entity uint32_t getNextInventorySequence(); - void send(); + bool findFirstItemWithId( uint32_t catalogId, Inventory::InventoryContainerPair& location ); uint8_t getFreeSlotsInBags(); diff --git a/src/world/Actor/PlayerInventory.cpp b/src/world/Actor/PlayerInventory.cpp index d0b9cf82..df42dc8d 100644 --- a/src/world/Actor/PlayerInventory.cpp +++ b/src/world/Actor/PlayerInventory.cpp @@ -932,4 +932,25 @@ void Sapphire::Entity::Player::insertInventoryItem( Sapphire::Common::InventoryT auto slotUpdate = std::make_shared< UpdateInventorySlotPacket >( getId(), slot, type, *item ); queuePacket( slotUpdate ); +} + +bool Sapphire::Entity::Player::findFirstItemWithId( uint32_t catalogId, + Inventory::InventoryContainerPair& location ) +{ + for( auto bagId : { Bag0, Bag1, Bag2, Bag3 } ) + { + auto& container = m_storageMap[ bagId ]; + + for( const auto& item : container->getItemMap() ) + { + if( item.second->getId() != catalogId ) + continue; + + location = std::make_pair( bagId, item.first ); + + return true; + } + } + + return false; } \ No newline at end of file diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index b14ac88b..1d3d079b 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -564,6 +564,18 @@ bool Sapphire::World::Manager::HousingMgr::initHouseModels( Entity::Player& play if( !preset ) return false; + // remove preset item + Inventory::InventoryContainerPair foundItem; + if( !player.findFirstItemWithId( presetCatalogId, foundItem ) ) + return false; + + auto item = player.dropInventoryItem( foundItem.first, foundItem.second ); + if( !item ) + return false; + + // move preset item into ext appearance container + houseInventory[ InventoryType::HousingExteriorAppearance ]->setItem( HouseExteriorSlot::HousePermit, item ); + // high iq shit auto invMap = std::map< uint16_t, std::map< uint32_t, int32_t > > { @@ -583,19 +595,19 @@ bool Sapphire::World::Manager::HousingMgr::initHouseModels( Entity::Player& play InventoryType::HousingInteriorAppearance, { // lobby/middle floor - { HousingInteriorSlot::InteriorWall, preset->interiorWall }, - { HousingInteriorSlot::InteriorFloor, preset->interiorFlooring }, - { HousingInteriorSlot::InteriorLight, preset->interiorLighting }, + { HouseInteriorSlot::InteriorWall, preset->interiorWall }, + { HouseInteriorSlot::InteriorFloor, preset->interiorFlooring }, + { HouseInteriorSlot::InteriorLight, preset->interiorLighting }, // attic - { HousingInteriorSlot::InteriorWall_Attic, preset->otherFloorWall }, - { HousingInteriorSlot::InteriorFloor_Attic, preset->otherFloorFlooring }, - { HousingInteriorSlot::InteriorLight_Attic, preset->otherFloorLighting }, + { HouseInteriorSlot::InteriorWall_Attic, preset->otherFloorWall }, + { HouseInteriorSlot::InteriorFloor_Attic, preset->otherFloorFlooring }, + { HouseInteriorSlot::InteriorLight_Attic, preset->otherFloorLighting }, // basement - { HousingInteriorSlot::InteriorWall_Basement, preset->basementWall }, - { HousingInteriorSlot::InteriorFloor_Basement, preset->basementFlooring }, - { HousingInteriorSlot::InteriorLight_Basement, preset->basementLighting }, + { HouseInteriorSlot::InteriorWall_Basement, preset->basementWall }, + { HouseInteriorSlot::InteriorFloor_Basement, preset->basementFlooring }, + { HouseInteriorSlot::InteriorLight_Basement, preset->basementLighting }, } } }; @@ -641,7 +653,7 @@ void Sapphire::World::Manager::HousingMgr::createHouse( Sapphire::HousePtr house pDb->execute( stmt ); } -void Sapphire::World::Manager::HousingMgr::buildPresetEstate( Entity::Player& player, uint8_t plotNum, uint32_t presetItem ) +void Sapphire::World::Manager::HousingMgr::buildPresetEstate( Entity::Player& player, uint8_t plotNum, uint32_t presetCatalogId ) { auto hZone = std::dynamic_pointer_cast< HousingZone >( player.getCurrentZone() ); @@ -656,8 +668,6 @@ void Sapphire::World::Manager::HousingMgr::buildPresetEstate( Entity::Player& pl if( pLand->getOwnerId() != player.getId() ) return; - // todo: check if permit is in inventory and remove one - // create house auto ident = pLand->getLandIdent(); auto house = make_House( getNextHouseId(), pLand->getLandSetId(), ident, @@ -666,8 +676,11 @@ void Sapphire::World::Manager::HousingMgr::buildPresetEstate( Entity::Player& pl pLand->setHouse( house ); // create inventory items - if( !initHouseModels( player, pLand, presetItem ) ) + if( !initHouseModels( player, pLand, presetCatalogId ) ) + { + pLand->setHouse( nullptr ); return; + } createHouse( house ); @@ -913,7 +926,7 @@ void Sapphire::World::Manager::HousingMgr::updateHouseModels( Sapphire::HousePtr { for( auto& item : intContainer->second->getItemMap() ) { - house->setInteriorModel( static_cast< Common::HousingInteriorSlot >( item.first ), + house->setInteriorModel( static_cast< Common::HouseInteriorSlot >( item.first ), getItemAdditionalData( item.second->getId() ) ); } } diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index 9dd0bd23..4f2a6898 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -91,7 +91,7 @@ namespace Sapphire::World::Manager bool relinquishLand( Entity::Player& player, uint8_t plot ); - void buildPresetEstate( Entity::Player& player, uint8_t plotNum, uint32_t presetItem ); + void buildPresetEstate( Entity::Player& player, uint8_t plotNum, uint32_t presetCatalogId ); void requestEstateRename( Entity::Player& player, const Common::LandIdent ident ); diff --git a/src/world/Territory/House.cpp b/src/world/Territory/House.cpp index 396e763e..fe08783d 100644 --- a/src/world/Territory/House.cpp +++ b/src/world/Territory/House.cpp @@ -96,12 +96,12 @@ Sapphire::House::HousePart Sapphire::House::getExteriorModel( Sapphire::Common:: return m_exteriorModelCache[ slot ]; } -void Sapphire::House::setInteriorModel( Sapphire::Common::HousingInteriorSlot slot, uint32_t modelId ) +void Sapphire::House::setInteriorModel( Sapphire::Common::HouseInteriorSlot slot, uint32_t modelId ) { m_interiorModelCache[ slot ] = modelId; } -uint32_t Sapphire::House::getInteriorModel( Sapphire::Common::HousingInteriorSlot slot ) +uint32_t Sapphire::House::getInteriorModel( Sapphire::Common::HouseInteriorSlot slot ) { return m_interiorModelCache[ slot ]; } diff --git a/src/world/Territory/House.h b/src/world/Territory/House.h index 3229e0e0..21d3ea86 100644 --- a/src/world/Territory/House.h +++ b/src/world/Territory/House.h @@ -34,8 +34,8 @@ namespace Sapphire void setExteriorModel( Common::HouseExteriorSlot slot, uint32_t modelId, uint16_t stain ); HousePart getExteriorModel( Common::HouseExteriorSlot slot ); - void setInteriorModel( Common::HousingInteriorSlot slot, uint32_t modelId ); - uint32_t getInteriorModel( Common::HousingInteriorSlot slot ); + void setInteriorModel( Common::HouseInteriorSlot slot, uint32_t modelId ); + uint32_t getInteriorModel( Common::HouseInteriorSlot slot ); HouseModelsArray const& getHouseModels() const; diff --git a/src/world/Territory/Housing/HousingInteriorTerritory.cpp b/src/world/Territory/Housing/HousingInteriorTerritory.cpp index dddbd86d..1ad7b57e 100644 --- a/src/world/Territory/Housing/HousingInteriorTerritory.cpp +++ b/src/world/Territory/Housing/HousingInteriorTerritory.cpp @@ -71,7 +71,7 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone for( auto i = 0; i < 10; i++ ) { indoorInitPacket->data().indoorItems[ i ] = pHouse->getInteriorModel( - static_cast< Common::HousingInteriorSlot >( i ) ); + static_cast< Common::HouseInteriorSlot >( i ) ); } player.queuePacket( indoorInitPacket ); From e418e61b4aa5ab8eb74aeb66e8e8550fa2942447 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 30 Dec 2018 18:48:45 +1100 Subject: [PATCH 65/86] #448 - Place character correctly on entering a house --- .../common/eobj/HousingEstateEntrance.cpp | 41 ++++++++++++++++--- src/world/Actor/Player.cpp | 27 ++++++++++++ src/world/Actor/Player.h | 3 ++ src/world/Manager/TerritoryMgr.cpp | 8 ++-- src/world/Manager/TerritoryMgr.h | 2 +- 5 files changed, 70 insertions(+), 11 deletions(-) diff --git a/src/scripts/common/eobj/HousingEstateEntrance.cpp b/src/scripts/common/eobj/HousingEstateEntrance.cpp index a576bc19..7461ef1e 100644 --- a/src/scripts/common/eobj/HousingEstateEntrance.cpp +++ b/src/scripts/common/eobj/HousingEstateEntrance.cpp @@ -4,6 +4,7 @@ #include "Actor/EventObject.h" #include "Territory/HousingZone.h" #include "Manager/TerritoryMgr.h" +#include "Territory/Land.h" #include "Framework.h" using namespace Sapphire; @@ -19,8 +20,6 @@ public: void onTalk( uint32_t eventId, Entity::Player& player, Entity::EventObject& eobj ) override { - player.sendDebug( "Found plot entrance for plot: " + std::to_string( eobj.getHousingLink() >> 8 ) ); - player.playScene( eventId, 0, 0, [this, eobj]( Entity::Player& player, const Event::SceneResult& result ) { // param2 == 1 when player wants to enter house @@ -42,15 +41,45 @@ public: ident.worldId = 67; auto internalZone = terriMgr->findOrCreateHousingInterior( ident ); - if( internalZone ) + if( !internalZone ) { - player.sendDebug( "created zone with guid: " + std::to_string( internalZone->getGuId() ) + "\nname: " + internalZone->getName() ); + // an error occurred during event movement + // lol + player.sendLogMessage( 1311 ); + player.eventFinish( result.eventId, 1 ); + return; } player.eventFinish( result.eventId, 1 ); - player.setPos( { 0.f, 0.f, 0.f } ); - player.setInstance( internalZone ); + Common::FFXIVARR_POSITION3 pos {}; + + auto land = zone->getLand( eobj.getHousingLink() >> 8 ); + if( !land ) + return; + + switch( land->getSize() ) + { + case 0: + { + pos = { 0.1321167f, 0.f, 2.746273f }; + break; + } + case 1: + { + pos = { 1.337722f, 0.f, 3.995964f }; + break; + } + case 2: + { + pos = { 0.07214607f, 0.f, 8.217761f }; + break; + } + default: + return; + } + + player.setInstance( internalZone, pos ); } ); } }; \ No newline at end of file diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 33bcb871..5696a8a0 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -459,6 +459,33 @@ bool Sapphire::Entity::Player::setInstance( ZonePtr instance ) return true; } +bool Sapphire::Entity::Player::setInstance( ZonePtr instance, Common::FFXIVARR_POSITION3 pos ) +{ + if( !instance ) + return false; + + m_onEnterEventDone = false; + + auto pTeriMgr = m_pFw->get< TerritoryMgr >(); + auto currentZone = getCurrentZone(); + + m_prevPos = m_pos; + m_prevRot = m_rot; + m_prevTerritoryTypeId = currentZone->getTerritoryTypeId(); + m_prevTerritoryId = getTerritoryId(); + + if( pTeriMgr->movePlayer( instance, getAsPlayer() ) ) + { + m_pos = pos; + + sendZonePackets(); + + return true; + } + + return false; +} + bool Sapphire::Entity::Player::exitInstance() { auto pTeriMgr = m_pFw->get< TerritoryMgr >(); diff --git a/src/world/Actor/Player.h b/src/world/Actor/Player.h index 2721bba2..218b27f9 100644 --- a/src/world/Actor/Player.h +++ b/src/world/Actor/Player.h @@ -482,6 +482,9 @@ namespace Sapphire::Entity /*! sets the players instance & initiates zoning process */ bool setInstance( ZonePtr instance ); + /*! sets the players instance & initiates zoning process */ + bool setInstance( Sapphire::ZonePtr instance, Sapphire::Common::FFXIVARR_POSITION3 pos ); + /*! returns the player to their position before zoning into an instance */ bool exitInstance(); diff --git a/src/world/Manager/TerritoryMgr.cpp b/src/world/Manager/TerritoryMgr.cpp index 575c60b7..9e260c61 100644 --- a/src/world/Manager/TerritoryMgr.cpp +++ b/src/world/Manager/TerritoryMgr.cpp @@ -287,7 +287,7 @@ Sapphire::ZonePtr Sapphire::World::Manager::TerritoryMgr::createInstanceContent( pTeri->name, pInstanceContent->name, instanceContentId, framework() ); pZone->init(); - m_instanceContentToInstanceMap[ instanceContentId ][ pZone->getGuId() ] = pZone; + m_instanceContentIdToInstanceMap[ instanceContentId ][ pZone->getGuId() ] = pZone; m_instanceIdToZonePtrMap[ pZone->getGuId() ] = pZone; m_instanceZoneSet.insert( pZone ); @@ -381,7 +381,7 @@ bool Sapphire::World::Manager::TerritoryMgr::removeTerritoryInstance( uint32_t i if( isInstanceContentTerritory( pZone->getTerritoryTypeId() ) ) { auto instance = std::dynamic_pointer_cast< InstanceContent >( pZone ); - m_instanceContentToInstanceMap[ instance->getInstanceContentId() ].erase( pZone->getGuId() ); + m_instanceContentIdToInstanceMap[ instance->getInstanceContentId() ].erase( pZone->getGuId() ); } else m_territoryTypeIdToInstanceGuidMap[ pZone->getTerritoryTypeId() ].erase( pZone->getGuId() ); @@ -486,8 +486,8 @@ void Sapphire::World::Manager::TerritoryMgr::updateTerritoryInstances( uint32_t Sapphire::World::Manager::TerritoryMgr::InstanceIdList Sapphire::World::Manager::TerritoryMgr::getInstanceContentIdList( uint16_t instanceContentId ) const { std::vector< uint32_t > idList; - auto zoneMap = m_instanceContentToInstanceMap.find( instanceContentId ); - if( zoneMap == m_instanceContentToInstanceMap.end() ) + auto zoneMap = m_instanceContentIdToInstanceMap.find( instanceContentId ); + if( zoneMap == m_instanceContentIdToInstanceMap.end() ) return idList; for( auto& entry : zoneMap->second ) diff --git a/src/world/Manager/TerritoryMgr.h b/src/world/Manager/TerritoryMgr.h index b32c9fcb..1905b7f6 100644 --- a/src/world/Manager/TerritoryMgr.h +++ b/src/world/Manager/TerritoryMgr.h @@ -176,7 +176,7 @@ namespace Sapphire::World::Manager LandSetIdToZonePtrMap m_landSetIdToZonePtrMap; /*! map holding actual instances of InstanceContent */ - InstanceContentIdToInstanceMap m_instanceContentToInstanceMap; + InstanceContentIdToInstanceMap m_instanceContentIdToInstanceMap; /*! flat map for easier lookup of instances by guid */ InstanceIdToZonePtrMap m_instanceIdToZonePtrMap; From e7587972136c61b332e78e42447933b96162558d Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 30 Dec 2018 20:24:20 +1100 Subject: [PATCH 66/86] minor refactoring and zero out model cache arrays on init --- src/world/Territory/House.cpp | 7 +++++-- src/world/Territory/House.h | 10 ++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/world/Territory/House.cpp b/src/world/Territory/House.cpp index fe08783d..def91bc6 100644 --- a/src/world/Territory/House.cpp +++ b/src/world/Territory/House.cpp @@ -19,7 +19,10 @@ Sapphire::House::House( uint32_t houseId, uint32_t landSetId, Common::LandIdent m_estateName( estateName ), m_estateComment( estateComment ), m_pFw( pFw ) -{} +{ + m_interiorModelCache.fill( 0 ); + m_exteriorModelCache.fill( std::make_pair( 0, 0 ) ); +} Sapphire::House::~House() = default; @@ -57,7 +60,7 @@ uint32_t Sapphire::House::getId() const return m_houseId; } -Sapphire::House::HouseModelsArray const& Sapphire::House::getHouseModels() const +Sapphire::House::ExteriorModelsArray const& Sapphire::House::getHouseModels() const { return m_exteriorModelCache; } diff --git a/src/world/Territory/House.h b/src/world/Territory/House.h index 21d3ea86..1fa0ca43 100644 --- a/src/world/Territory/House.h +++ b/src/world/Territory/House.h @@ -5,6 +5,7 @@ #include #include #include +#include namespace Sapphire { @@ -17,7 +18,8 @@ namespace Sapphire virtual ~House(); using HousePart = std::pair< uint32_t, uint16_t >; - using HouseModelsArray = std::array< HousePart, 8 >; + using ExteriorModelsArray = std::array< HousePart, 8 >; + using InteriorModelsArray = std::array< uint32_t, 10 >; //gerneral uint32_t getLandSetId() const; @@ -37,7 +39,7 @@ namespace Sapphire void setInteriorModel( Common::HouseInteriorSlot slot, uint32_t modelId ); uint32_t getInteriorModel( Common::HouseInteriorSlot slot ); - HouseModelsArray const& getHouseModels() const; + ExteriorModelsArray const& getHouseModels() const; void updateHouseDb(); @@ -52,8 +54,8 @@ namespace Sapphire uint64_t m_buildTime; bool m_hasAetheryte; - HouseModelsArray m_exteriorModelCache; - uint32_t m_interiorModelCache[10]; + ExteriorModelsArray m_exteriorModelCache; + InteriorModelsArray m_interiorModelCache; std::string m_estateComment; std::string m_estateName; From 35db5865a29ad4991782838d335b357b3eeed03a Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 30 Dec 2018 20:26:03 +1100 Subject: [PATCH 67/86] fix eobj id allocation skipping every nth index --- src/world/Territory/Zone.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/world/Territory/Zone.cpp b/src/world/Territory/Zone.cpp index 699a1dfd..1a3a5745 100644 --- a/src/world/Territory/Zone.cpp +++ b/src/world/Territory/Zone.cpp @@ -714,7 +714,6 @@ void Sapphire::Zone::registerEObj( Entity::EventObjectPtr object ) if( !object ) return; - object->setId( getNextEObjId() ); pushActor( object ); m_eventObjects[ object->getId() ] = object; From 66964ec8f6892adcbb54df18a41f967d84c9a1aa Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 30 Dec 2018 21:26:32 +1100 Subject: [PATCH 68/86] fix issue where items couldn't be placed in storeroom from inv --- src/common/Logging/Logger.cpp | 10 ++ src/common/Logging/Logger.h | 4 + .../Network/PacketDef/Zone/ClientZoneDef.h | 2 +- src/world/Manager/HousingMgr.cpp | 133 ++++++++++++++---- src/world/Manager/HousingMgr.h | 4 + src/world/Network/Handlers/PacketHandlers.cpp | 10 +- 6 files changed, 130 insertions(+), 33 deletions(-) diff --git a/src/common/Logging/Logger.cpp b/src/common/Logging/Logger.cpp index 1a599551..c051e946 100644 --- a/src/common/Logging/Logger.cpp +++ b/src/common/Logging/Logger.cpp @@ -58,6 +58,11 @@ namespace Sapphire spdlog::get( "logger" )->error( text ); } + void Logger::warn( const std::string& text ) + { + spdlog::get( "logger" )->warn( text ); + } + void Logger::info( const std::string& text ) { spdlog::get( "logger" )->info( text ); @@ -73,4 +78,9 @@ namespace Sapphire spdlog::get( "logger" )->critical( text ); } + void Logger::trace( const std::string& text ) + { + spdlog::get( "logger" )->trace( text ); + } + } diff --git a/src/common/Logging/Logger.h b/src/common/Logging/Logger.h index 876fadc3..b716e319 100644 --- a/src/common/Logging/Logger.h +++ b/src/common/Logging/Logger.h @@ -20,12 +20,16 @@ namespace Sapphire static void error( const std::string& text ); + static void warn( const std::string& text ); + static void info( const std::string& text ); static void debug( const std::string& text ); static void fatal( const std::string& text ); + static void trace( const std::string& text ); + }; } diff --git a/src/common/Network/PacketDef/Zone/ClientZoneDef.h b/src/common/Network/PacketDef/Zone/ClientZoneDef.h index 12b452dd..e096fa8a 100644 --- a/src/common/Network/PacketDef/Zone/ClientZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ClientZoneDef.h @@ -253,7 +253,7 @@ struct FFXIVIpcReqPlaceHousingItem : /* 000C */ Common::FFXIVARR_POSITION3 position; /* 0018 */ float rotation; - /* 001C */ uint32_t unknown3; // always 1? + /* 001C */ uint32_t shouldPlaceItem; // 1 if placing an item, 0 if placing in store /* 0020 */ uint32_t unknown4[2]; // always 0 it looks like }; diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 1d3d079b..8badd385 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -416,11 +416,10 @@ bool Sapphire::World::Manager::HousingMgr::relinquishLand( Entity::Player& playe auto pLand = pHousing->getLand( plot ); auto plotMaxPrice = pLand->getCurrentPrice(); - auto landOwnerId = pLand->getOwnerId(); // can't relinquish when you are not the owner // TODO: actually use permissions here for FC houses - if( landOwnerId != player.getId() ) + if( !hasPermission( player, *pLand, 0 ) ) { auto msgPkt = makeActorControl143( player.getId(), ActorControl::LogMsg, 3304, 0 ); player.queuePacket( msgPkt ); @@ -664,8 +663,7 @@ void Sapphire::World::Manager::HousingMgr::buildPresetEstate( Entity::Player& pl if( !pLand ) return; - // todo: when doing FC houses, look up the type from the original purchase and check perms from FC and set state accordingly - if( pLand->getOwnerId() != player.getId() ) + if( !hasPermission( player, *pLand, 0 ) ) return; // create house @@ -763,8 +761,7 @@ void Sapphire::World::Manager::HousingMgr::updateEstateGreeting( Entity::Player& if( !land ) return; - // todo: implement proper permissions checks - if( land->getOwnerId() != player.getId() ) + if( !hasPermission( player, *land, 0 ) ) return; auto house = land->getHouse(); @@ -789,8 +786,7 @@ void Sapphire::World::Manager::HousingMgr::requestEstateEditGuestAccess( Entity: if( !land ) return; - // todo: add proper permission check - if( land->getOwnerId() != player.getId() ) + if( !hasPermission( player, *land, 0 ) ) return; auto packet = makeZonePacket< Server::FFXIVIpcHousingShowEstateGuestAccess >( player.getId() ); @@ -854,8 +850,7 @@ void Sapphire::World::Manager::HousingMgr::sendEstateInventory( Entity::Player& if( !targetLand ) return; - // todo: add proper permissions checks - if( targetLand->getOwnerId() != player.getId() ) + if( !hasPermission( player, *targetLand, 0 ) ) return; auto& containers = getEstateInventory( targetLand->getLandIdent() ); @@ -993,12 +988,11 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceHousingItem( Sapphire::Entity if( !land ) return; - // todo: add proper permissions checks - if( land->getOwnerId() != player.getId() ) + if( !hasPermission( player, *land, 0 ) ) return; // todo: check item position and make sure it's not outside the plot - // retail uses a radius based check + // anecdotal evidence on reddit seems to imply retail uses a radius based check // unlink item Inventory::HousingItemPtr item; @@ -1009,6 +1003,8 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceHousingItem( Sapphire::Entity containerId == InventoryType::Bag3 ) { auto tmpItem = player.dropInventoryItem( static_cast< Common::InventoryType >( containerId ), slotId ); + if( !tmpItem ) + return; item = Inventory::make_HousingItem( tmpItem->getUId(), tmpItem->getId(), framework() ); @@ -1042,6 +1038,76 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceHousingItem( Sapphire::Entity player.sendUrgent( "An internal error occurred when placing the item." ); } +void Sapphire::World::Manager::HousingMgr::reqPlaceItemInStore( Sapphire::Entity::Player& player, uint16_t landId, + uint16_t containerId, uint16_t slotId ) +{ + LandPtr land; + bool isOutside = false; + + if( auto zone = std::dynamic_pointer_cast< HousingZone >( player.getCurrentZone() ) ) + { + land = zone->getLand( landId ); + isOutside = true; + } + else if( auto zone = std::dynamic_pointer_cast< Territory::Housing::HousingInteriorTerritory >( player.getCurrentZone() ) ) + { + // todo: this whole process is retarded and needs to be fixed + // perhaps maintain a list of estates by ident inside housingmgr? + auto ident = zone->getLandIdent(); + auto landSet = toLandSetId( ident.territoryTypeId, ident.wardNum ); + + land = getHousingZoneByLandSetId( landSet )->getLand( ident.landId ); + } + + if( !hasPermission( player, *land, 0 ) ) + return; + + auto invMgr = framework()->get< InventoryMgr >(); + auto ident = land->getLandIdent(); + auto& containers = getEstateInventory( ident ); + + if( isOutside ) + { + auto& container = containers[ InventoryType::HousingExteriorStoreroom ]; + + auto freeSlot = container->getFreeSlot(); + if( freeSlot == -1 ) + return; + + auto item = player.dropInventoryItem( static_cast< Common::InventoryType >( containerId ), slotId ); + if( !item ) + return; + + container->setItem( freeSlot, item ); + invMgr->sendInventoryContainer( player, container ); + invMgr->saveHousingContainer( ident, container ); + } + else + { + for( auto houseContainer : m_internalStoreroomContainers ) + { + auto needle = containers.find( houseContainer ); + if( needle == containers.end() ) + continue; + + auto container = needle->second; + auto freeSlot = container->getFreeSlot(); + if( freeSlot == -1 ) + { + continue; + } + + auto item = player.dropInventoryItem( static_cast< Common::InventoryType >( containerId ), slotId ); + if( !item ) + return; + + container->setItem( freeSlot, item ); + invMgr->sendInventoryContainer( player, container ); + invMgr->saveHousingContainer( ident, container ); + } + } +} + bool Sapphire::World::Manager::HousingMgr::placeExternalItem( Entity::Player& player, Inventory::HousingItemPtr item, Common::LandIdent ident ) @@ -1107,9 +1173,6 @@ bool Sapphire::World::Manager::HousingMgr::placeInteriorItem( Entity::Player& pl // have a free slot container->setItem( freeSlot, item ); - // todo: see comment above in placeExternalItem where the same func is called - invMgr->saveItem( player, item ); - // resend container invMgr->sendInventoryContainer( player, container ); invMgr->saveHousingContainer( ident, container ); @@ -1176,8 +1239,7 @@ void Sapphire::World::Manager::HousingMgr::reqMoveHousingItem( Entity::Player& p if( !land ) return; - // todo: proper perms checks - if( land->getOwnerId() != player.getId() ) + if( !hasPermission( player, *land, 0 ) ) return; // todo: what happens when either of these fail? how does the server let the client know that the moment failed @@ -1250,8 +1312,7 @@ bool Sapphire::World::Manager::HousingMgr::moveExternalItem( Entity::Player& pla { auto land = terri.getLand( ident.landId ); - // todo: add proper perms check - if( land->getOwnerId() != player.getId() ) + if( !hasPermission( player, *land, 0 ) ) return false; auto& containers = getEstateInventory( ident ); @@ -1298,8 +1359,7 @@ void Sapphire::World::Manager::HousingMgr::reqRemoveHousingItem( Sapphire::Entit if( !land ) return; - // todo: proper perms checks - if( land->getOwnerId() != player.getId() ) + if( !hasPermission( player, *land, 0 ) ) return; removeInternalItem( player, *terri, containerId, slot, sendToStoreroom ); @@ -1310,7 +1370,7 @@ void Sapphire::World::Manager::HousingMgr::reqRemoveHousingItem( Sapphire::Entit if( !land ) return; - if( land->getOwnerId() != player.getId() ) + if( !hasPermission( player, *land, 0 ) ) return; auto containerType = static_cast< Common::InventoryType >( containerId ); @@ -1419,11 +1479,13 @@ bool Sapphire::World::Manager::HousingMgr::removeExternalItem( Entity::Player& p if( !item ) return false; + bool shouldDespawnItem = containerType != InventoryType::HousingExteriorStoreroom; + auto invMgr = framework()->get< InventoryMgr >(); if( sendToStoreroom ) { - auto& storeroomContainer = containers[ InventoryType::HousingExteriorStoreroom ]; + auto& storeroomContainer = containers[ containerType ]; auto freeSlot = storeroomContainer->getFreeSlot(); if( freeSlot == -1 ) @@ -1431,8 +1493,8 @@ bool Sapphire::World::Manager::HousingMgr::removeExternalItem( Entity::Player& p sourceContainer->removeItem( slotId ); invMgr->sendInventoryContainer( player, sourceContainer ); - invMgr->removeHousingItemPosition( *item ); invMgr->removeItemFromHousingContainer( land.getLandIdent(), sourceContainer->getId(), slotId ); + invMgr->removeHousingItemPosition( *item ); storeroomContainer->setItem( freeSlot, item ); invMgr->sendInventoryContainer( player, storeroomContainer ); @@ -1454,7 +1516,8 @@ bool Sapphire::World::Manager::HousingMgr::removeExternalItem( Entity::Player& p player.insertInventoryItem( containerPair.first, containerPair.second, item ); } - terri.despawnYardObject( land.getLandIdent().landId, slotId ); + if( shouldDespawnItem ) + terri.despawnYardObject( land.getLandIdent().landId, slotId ); return true; } @@ -1495,8 +1558,7 @@ void Sapphire::World::Manager::HousingMgr::reqEstateExteriorRemodel( Sapphire::E if( !land ) return; - // todo: proper perms checks - if( land->getOwnerId() != player.getId() ) + if( !hasPermission( player, *land, 0 ) ) return; auto& inv = getEstateInventory( land->getLandIdent() ); @@ -1526,8 +1588,7 @@ void Sapphire::World::Manager::HousingMgr::reqEstateInteriorRemodel( Sapphire::E if( !land ) return; - // todo: proper perms checks - if( land->getOwnerId() != player.getId() ) + if( !hasPermission( player, *land, 0 ) ) return; auto& inv = getEstateInventory( land->getLandIdent() ); @@ -1541,4 +1602,16 @@ void Sapphire::World::Manager::HousingMgr::reqEstateInteriorRemodel( Sapphire::E auto pkt = Server::makeActorControl143( player.getId(), Network::ActorControl::ShowEstateInternalAppearanceUI ); player.queuePacket( pkt ); +} + +bool Sapphire::World::Manager::HousingMgr::hasPermission( Sapphire::Entity::Player& player, Sapphire::Land& land, + uint32_t permission ) +{ + // todo: proper perms checks pls + if( land.getOwnerId() == player.getId() ) + return true; + + // todo: check perms here + + return false; } \ No newline at end of file diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index 4f2a6898..deb6c099 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -159,6 +159,8 @@ namespace Sapphire::World::Manager void reqPlaceHousingItem( Entity::Player& player, uint16_t landId, uint16_t containerId, uint16_t slotId, Common::FFXIVARR_POSITION3 pos, float rotation ); + void reqPlaceItemInStore( Entity::Player& player, uint16_t landId, uint16_t containerId, uint16_t slotId ); + /*! * @brief Returns the equivalent YardObject for a HousingItem * @param item The item to convert into a YardObject @@ -179,6 +181,8 @@ namespace Sapphire::World::Manager void reqEstateInteriorRemodel( Entity::Player& player ); + bool hasPermission( Entity::Player& player, Land& land, uint32_t permission ); + private: ItemContainerPtr getFreeEstateInventorySlot( Common::LandIdent ident, diff --git a/src/world/Network/Handlers/PacketHandlers.cpp b/src/world/Network/Handlers/PacketHandlers.cpp index a41ed334..fa6543bf 100644 --- a/src/world/Network/Handlers/PacketHandlers.cpp +++ b/src/world/Network/Handlers/PacketHandlers.cpp @@ -731,8 +731,14 @@ void Sapphire::Network::GameConnection::reqPlaceHousingItem( FrameworkPtr pFw, const auto packet = ZoneChannelPacket< Client::FFXIVIpcReqPlaceHousingItem >( inPacket ); const auto& data = packet.data(); - housingMgr->reqPlaceHousingItem( player, data.landId, data.sourceInvContainerId, data.sourceInvSlotId, - data.position, data.rotation ); + if( data.shouldPlaceItem == 1 ) + { + housingMgr->reqPlaceHousingItem( player, data.landId, data.sourceInvContainerId, data.sourceInvSlotId, + data.position, data.rotation ); + } + else + housingMgr->reqPlaceItemInStore( player, data.landId, data.sourceInvContainerId, data.sourceInvSlotId ); + } void Sapphire::Network::GameConnection::reqMoveHousingItem( FrameworkPtr pFw, From d21b0018dce8f8610f0809e680bfb1772f727f17 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 30 Dec 2018 22:36:44 +1100 Subject: [PATCH 69/86] standardise log names and potentially fix log folder issue on windows --- src/api/main.cpp | 2 +- src/common/Logging/Logger.cpp | 2 +- src/dbm/main.cpp | 2 +- src/lobby/ServerLobby.cpp | 8 +++----- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/api/main.cpp b/src/api/main.cpp index 81aa0024..f287fc08 100644 --- a/src/api/main.cpp +++ b/src/api/main.cpp @@ -734,7 +734,7 @@ void defaultGet( shared_ptr< HttpServer::Response > response, shared_ptr< HttpSe int main( int argc, char* argv[] ) { - Logger::init( "log/SapphireAPI" ); + Logger::init( "log/api" ); Logger::info( "===========================================================" ); Logger::info( "Sapphire API Server " ); diff --git a/src/common/Logging/Logger.cpp b/src/common/Logging/Logger.cpp index c051e946..dbf83f4f 100644 --- a/src/common/Logging/Logger.cpp +++ b/src/common/Logging/Logger.cpp @@ -25,7 +25,7 @@ namespace Sapphire void Logger::init( const std::string& logPath ) { - auto pos = logPath.find_last_of( '/' ); + auto pos = logPath.find_last_of( fs::path::preferred_separator ); if( pos != std::string::npos ) { diff --git a/src/dbm/main.cpp b/src/dbm/main.cpp index 6cce2ac4..b82dde0c 100644 --- a/src/dbm/main.cpp +++ b/src/dbm/main.cpp @@ -104,7 +104,7 @@ int main( int32_t argc, char* argv[] ) std::string database; std::string pass; - Logger::init( "log/SapphireDbm" ); + Logger::init( "log/dbm" ); std::string sFile; std::string iFile; diff --git a/src/lobby/ServerLobby.cpp b/src/lobby/ServerLobby.cpp index dcdacee1..c0ad8ebf 100644 --- a/src/lobby/ServerLobby.cpp +++ b/src/lobby/ServerLobby.cpp @@ -31,12 +31,10 @@ namespace Sapphire m_configPath( configPath ), m_numConnections( 0 ) { - m_pConfig = std::shared_ptr< ConfigMgr >( new ConfigMgr ); + m_pConfig = std::make_shared< ConfigMgr >(); } - ServerLobby::~ServerLobby( void ) - { - } + ServerLobby::~ServerLobby( void ) = default; LobbySessionPtr ServerLobby::getSession( char* sessionId ) { @@ -50,7 +48,7 @@ namespace Sapphire void ServerLobby::run( int32_t argc, char* argv[] ) { - Logger::init( "log/SapphireLobby" ); + Logger::init( "log/lobby" ); Logger::info( "===========================================================" ); Logger::info( "Sapphire Server Project " ); From 06afdfb79ef9f8f187f6b80bfa157e3f5efbdc74 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 30 Dec 2018 23:25:52 +1100 Subject: [PATCH 70/86] hide additional quarters door in private housing --- src/common/Network/CommonActorControl.h | 1 + src/common/Network/PacketDef/Zone/ServerZoneDef.h | 4 ++++ src/world/Territory/Housing/HousingInteriorTerritory.cpp | 6 +++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/common/Network/CommonActorControl.h b/src/common/Network/CommonActorControl.h index 6438bc49..32a00705 100644 --- a/src/common/Network/CommonActorControl.h +++ b/src/common/Network/CommonActorControl.h @@ -240,6 +240,7 @@ enum ActorControlType : uint16_t */ HousingItemMoveConfirm = 0x3F9, OpenEstateSettingsUI = 0x3FF, + HideAdditionalChambersDoor = 0x400, /*! * param1 = outdoor furnishings diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 40cd48a3..63ea03ba 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -1701,6 +1701,10 @@ struct FFXIVIpcHousingObjectMove : FFXIVIpcBasePacket< HousingObjectMove > struct FFXIVIpcHousingObjectInitialize : FFXIVIpcBasePacket< HousingObjectInitialize > { Common::LandIdent landIdent; + /*! + * when this is 2, actrl 0x400 will hide the additional quarters door + * if it's any other value, it will stay there regardless + */ int8_t u1; //Outdoor -1 / Indoor 0 - probably indicator uint8_t packetNum; uint8_t packetTotal; diff --git a/src/world/Territory/Housing/HousingInteriorTerritory.cpp b/src/world/Territory/Housing/HousingInteriorTerritory.cpp index 1ad7b57e..63fb581e 100644 --- a/src/world/Territory/Housing/HousingInteriorTerritory.cpp +++ b/src/world/Territory/Housing/HousingInteriorTerritory.cpp @@ -76,12 +76,14 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone player.queuePacket( indoorInitPacket ); + auto yardPacketTotal = static_cast< uint8_t >( 2 + pLand->getSize() ); for( uint8_t yardPacketNum = 0; yardPacketNum < yardPacketTotal; yardPacketNum++ ) { auto objectInitPacket = makeZonePacket< Server::FFXIVIpcHousingObjectInitialize >( player.getId() ); memcpy( &objectInitPacket->data().landIdent, &m_landIdent, sizeof( Common::LandIdent ) ); - objectInitPacket->data().u1 = 0; + // todo: change this when FC houses become a thing + objectInitPacket->data().u1 = 2; // 2 = actrl 0x400 will hide the fc door, otherwise it will stay there objectInitPacket->data().u2 = 100; objectInitPacket->data().packetNum = yardPacketNum; objectInitPacket->data().packetTotal = yardPacketTotal; @@ -92,6 +94,8 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone player.queuePacket( objectInitPacket ); } + // todo: if in fc house, don't send this + player.queuePacket( Server::makeActorControl143( player.getId(), Network::ActorControl::HideAdditionalChambersDoor ) ); } void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onUpdate( uint32_t currTime ) From b2b38d2f10e8110095becdedea32589bc27efd1a Mon Sep 17 00:00:00 2001 From: Mordred Date: Sun, 30 Dec 2018 17:36:30 +0100 Subject: [PATCH 71/86] Added a new table for spawnpoints and initial data --- bin/sql/schema/inserts.sql | 310 +++++++++++++++++++++++++++++++++++ bin/sql/schema/schema.sql | 13 +- src/tools/mob_parse/main.cpp | 37 ++++- 3 files changed, 353 insertions(+), 7 deletions(-) diff --git a/bin/sql/schema/inserts.sql b/bin/sql/schema/inserts.sql index dc9568b9..4ebaea9d 100644 --- a/bin/sql/schema/inserts.sql +++ b/bin/sql/schema/inserts.sql @@ -9183,3 +9183,313 @@ INSERT INTO `zonepositions` (`id`, `target_zone_id`, `pos_x`, `pos_y`, `pos_z`, (6905297, 620, -653.588, 51.867, -790.168, 1.1366, 2), (6906489, 635, -82.295, 0, 8.925, 1.77, 2), (6906492, 635, 100.312, 2.731, -113.366, -0.481, 2); + + +INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'megalocrab_326' ) , 10, 192 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -345.388947, 29.566580, -435.753174, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -326.154724, 22.296928, -401.389435, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -244.302933, 12.706744, -305.015015, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -302.352875, 13.372667, -300.373566, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -317.955841, 14.688709, -320.949066, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -298.585846, 18.829691, -359.511688, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -275.675323, 22.961006, -380.670990, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -287.137817, 23.382748, -389.604645, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -226.550751, 14.436340, -352.420563, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -246.839096, 15.333442, -347.116882, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -238.478638, 15.116598, -356.427399, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'wespe_385' ) , 10, 192 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -298.493927, 21.773628, -406.852844, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -269.881897, 14.504688, -322.676117, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -272.379456, 14.096419, -318.399017, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -271.760620, 23.480957, -387.760803, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -313.823639, 13.033344, -301.501678, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 10, 192 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -9.390060, 14.245410, -457.364075, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -19.925201, 11.680475, -450.890533, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -6.758735, 14.201798, -461.258636, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -20.628424, 11.938938, -439.977692, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -70.013916, 12.245436, -411.487366, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -226.313797, 12.305261, -314.432495, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -231.436157, 13.084026, -319.166626, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -198.334290, 12.714041, -360.448151, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'wildjackal_138' ) , 11, 217 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -231.388519, 22.400616, -441.069214, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -227.498245, 23.399185, -446.166595, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -175.239288, 15.520851, -399.813934, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -151.488739, 14.084651, -391.802826, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -176.903427, 17.061604, -407.286926, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -200.076279, 24.850960, -447.242645, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -216.500504, 27.365400, -473.241180, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'CaptainPetyrPigeontoe_350' ) , 11, 217 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -57.328251, 51.480759, -227.008499, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'wespe_385' ) , 11, 217 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -202.810013, 25.391012, -460.873047, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -235.964523, 25.110031, -467.975067, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -199.158157, 14.872395, -396.241333, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'wildjackal_138' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -356.450928, 33.451496, -540.853455, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -320.785858, 33.649094, -583.676697, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -287.356537, 30.274841, -561.919373, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -249.511169, 25.519537, -483.387787, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -325.360657, 27.810431, -472.799927, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -325.478394, 27.690218, -475.958923, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -335.211273, 36.900539, -595.765808, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -318.070435, 36.132381, -591.977966, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -284.451721, 22.047026, -437.852325, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -324.255280, 27.436514, -526.413879, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -370.006042, 35.231163, -487.073334, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -373.264984, 35.985336, -488.961395, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -367.792694, 36.009693, -495.739410, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'mosslessgoobbue_1447' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 5.364128, 44.093685, 107.553200, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 152.268539, 46.724518, 136.338364, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 74.707085, 46.311752, 136.568741, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'wespe_385' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -358.018402, 33.117115, -563.082275, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -282.515167, 26.205408, -541.412598, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -292.101288, 25.391624, -533.395813, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -337.221771, 29.686281, -470.199615, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'wildjackal_138' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -250.047440, 31.206146, -576.813782, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -248.136444, 33.524559, -595.852356, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -257.733032, 33.874985, -597.828491, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -218.360413, 33.645500, -505.330078, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -227.525543, 31.869547, -509.008240, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -214.430328, 32.272133, -539.706909, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'megalocrab_326' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -372.613434, 24.118813, -380.878967, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -365.744934, 23.897331, -381.954956, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -360.261383, 13.775493, -317.929474, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -348.834808, 17.254112, -347.665527, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -361.815643, 16.845871, -349.862549, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'wespe_385' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -355.717438, 17.858700, -352.803070, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -377.243317, 26.654594, -393.651733, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -269.175659, 33.564983, -589.111572, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -207.435623, 32.362934, -565.767761, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -376.526489, 13.896859, -324.553253, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -243.008102, 30.253586, -570.609436, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -242.243301, 27.613777, -521.215027, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -420.094330, 12.597722, -311.434753, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -421.849731, 12.510590, -311.934723, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -366.167694, 12.091236, -306.270905, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'mosslessgoobbue_1447' ) , 17, 369 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -58.299580, 55.042175, -257.084961, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 78.795578, 51.582069, -32.362301, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -28.510176, 47.169777, 7.795540, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'wharfrat_347' ) , 1, 44 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 17.551537, 29.851358, 189.738098, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -21.262884, 29.407082, 179.518234, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -19.720869, 29.053928, 181.304443, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 4.495502, 30.380665, 172.407364, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -73.329781, 43.955208, 155.005188, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -66.518013, 42.989105, 118.780502, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -68.166626, 43.007225, 107.905563, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -61.092205, 43.629402, 111.378723, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -0.234561, 24.291334, 201.717117, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -4.773578, 23.680052, 196.653931, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -85.779884, 44.791718, 145.633957, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -85.749100, 44.637295, 143.545715, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -20.238331, 45.256756, 96.337936, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -46.197205, 44.597931, 113.161217, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -17.754864, 45.153427, 99.784790, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 2.992736, 45.949394, 79.764458, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 38.424831, 44.679016, 151.940872, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -1.866279, 24.183924, 198.192154, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 45.086426, 45.106491, 148.815216, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 34.979847, 44.280872, 158.869125, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 28.076588, 43.842724, 141.637619, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 6.916911, 43.823296, 109.991936, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'littleladybug_49' ) , 1, 44 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 8.591410, 27.638182, 213.702469, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -5.038459, 28.971394, 177.228210, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -78.871887, 43.941578, 147.002197, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -49.422501, 44.440933, 100.524612, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 28.934925, 34.461262, 183.119568, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 26.059912, 34.235126, 188.966934, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 2.693619, 44.330345, 106.495529, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 31.875931, 44.091866, 155.132431, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'strikingdummy_901' ) , 1, 44 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 226.015106, 103.203697, -193.008301, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 253.558899, 105.985802, -214.094299, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 249.144104, 105.712402, -208.740204, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 244.738297, 105.634201, -204.802994, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 220.339401, 103.033401, -192.118607, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'wharfrat_347' ) , 2, 51 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 132.287445, 48.774925, 60.049950, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 136.677322, 48.342552, 79.262779, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 133.528473, 48.270821, 77.847992, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 129.654846, 46.787323, 109.788803, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 160.743423, 47.474777, 108.471367, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 158.584122, 47.480267, 108.689880, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 130.970322, 46.841934, 109.707222, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 137.913269, 46.945381, 111.036270, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 101.688782, 48.229084, 67.383591, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 97.552887, 47.999767, 67.711365, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 103.503937, 48.141754, 69.153397, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 97.344719, 46.694866, 81.742561, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 87.444679, 46.425037, 120.738876, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 90.658997, 46.397110, 122.156570, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 74.095657, 46.443115, 117.044342, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 67.960510, 47.640308, 52.202122, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 76.655762, 47.580715, 63.141129, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 36.554558, 44.667294, 102.201637, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 36.965904, 44.615826, 98.036583, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'littleladybug_49' ) , 2, 51 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 136.463654, 48.419487, 76.549248, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 40.421417, 47.941963, 59.158360, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 108.089668, 46.433601, 104.064827, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 107.238647, 46.415787, 105.150032, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 95.160904, 48.173183, 50.316780, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 37.956974, 44.704605, 99.881027, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'lostlamb_338' ) , 3, 59 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 115.549736, 57.190449, 214.553436, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 108.525253, 56.042690, 209.422760, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 53.051403, 62.446442, 282.129425, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 51.944962, 61.911633, 276.713409, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 70.922646, 56.992622, 225.424026, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 71.078773, 56.885986, 223.856781, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 53.744236, 57.267506, 242.963562, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 126.297165, 51.641514, 183.525055, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 36.394539, 50.344387, 210.498703, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 40.321896, 51.855530, 215.426514, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 115.232063, 50.115326, 176.923965, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 112.856224, 50.262341, 179.783936, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 51.554813, 50.278587, 197.175262, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 131.076126, 51.404095, 181.327026, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 106.336151, 46.542542, 146.037781, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 109.529419, 46.496357, 146.864578, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 54.411922, 47.397476, 188.868851, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 55.938103, 48.382042, 192.162201, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 83.970428, 46.898621, 171.290314, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'littleladybug_49' ) , 3, 59 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 93.714684, 60.832500, 257.380402, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 37.119259, 49.030884, 202.622604, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 92.332085, 57.267738, 222.708633, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 108.338364, 46.940929, 155.956055, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 86.729538, 47.873699, 181.971664, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 86.173416, 47.911686, 182.943954, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'lostlamb_338' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 164.362442, 54.497883, 210.910156, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 186.164612, 61.510574, 211.963135, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 185.987930, 56.263233, 187.923843, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 189.434906, 56.940521, 186.661606, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 190.979340, 60.333061, 200.027451, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 180.632248, 47.897598, 144.888062, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 182.115936, 48.810600, 152.630585, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 179.268143, 48.080715, 148.391388, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 157.007324, 60.923241, 263.217133, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 150.500488, 60.850376, 263.248718, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 146.530884, 57.584221, 233.633820, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 128.803909, 60.055973, 252.144592, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 145.100479, 57.249226, 223.608643, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 139.773010, 57.841290, 226.183258, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 138.917557, 58.084629, 228.757660, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'pukhatchling_341' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 11.993903, 51.633678, -102.898903, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 5.280601, 52.694759, -114.580383, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -1.444717, 53.167774, -115.282059, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -10.711990, 49.782681, -90.152298, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -15.019464, 49.165482, -87.729759, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 2.284972, 47.606350, 19.982195, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 5.341366, 50.012794, -60.434803, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 12.952839, 50.403530, -58.057556, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 113.687347, 65.358727, -110.080292, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 107.216080, 62.031960, -96.706802, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 103.731094, 62.449772, -104.154373, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 77.290741, 49.612831, 0.064280, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 79.626144, 49.297306, 4.778895, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 58.414593, 50.474976, -30.910105, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 78.437317, 55.576977, -68.951340, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 85.662285, 56.313927, -69.116508, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 101.731392, 56.317226, -50.044048, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -4.679257, 49.292801, -27.752888, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -3.263829, 49.315575, -35.775459, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -4.821778, 49.282028, -25.081804, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 30.025280, 49.349777, -5.415370, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'pugil_383' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 110.613480, 44.009529, 30.942867, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 135.623169, 44.819939, 32.029903, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -66.687996, 39.260262, 73.701317, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 33.763969, 42.924706, 30.753731, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -40.181015, 40.679569, 71.883293, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -35.683956, 40.893539, 66.671013, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 14.538228, 43.437088, 46.584648, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -7.279146, 42.683540, 49.196579, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 10.273220, 42.865303, 39.455036, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 12.479734, 43.282387, 45.144421, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 79.434624, 43.189404, 29.502472, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 111.008865, 44.158417, 28.212202, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'littleladybug_49' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 129.664551, 58.286568, 220.240219, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 176.934769, 58.712387, 226.232986, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 129.747498, 60.830498, 274.423828, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 203.351578, 50.978226, 152.279388, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 203.548477, 51.224773, 153.686295, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 175.959366, 53.570744, 189.470215, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 131.472961, 59.694351, 248.385452, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'beecloud_57' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 76.020264, 55.370415, -69.352966, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 11.170364, 49.838821, -68.782326, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 104.571152, 51.888584, -19.764053, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 0.773760, 47.606594, 19.565292, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -21.204916, 46.720444, -30.901602, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'tinymandragora_118' ) , 5, 91 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 28.168560, 60.444397, -183.799896, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 26.053051, 60.401928, -183.783249, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -15.484033, 54.311432, -156.329300, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -12.599415, 54.562565, -155.812119, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -16.257294, 53.970779, -149.141663, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 95.645035, 73.184212, -211.623795, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -12.141672, 57.110146, -193.953354, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -16.450117, 56.646244, -187.739624, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 90.372414, 66.027878, -163.958939, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 95.131348, 66.684288, -163.940903, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 20.829683, 56.061222, -157.242508, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 131.480545, 84.157242, -216.300781, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 132.541214, 84.289825, -211.426544, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 116.005386, 67.953743, -142.929062, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 147.584274, 85.442703, -178.240295, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 120.868019, 73.653473, -167.020645, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 124.458961, 79.525024, -191.170502, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 17.138042, 55.869495, -155.769455, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 62.006012, 55.425858, -125.869781, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 67.963425, 56.335258, -114.111465, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 64.461700, 55.657070, -117.027122, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 114.746140, 67.471092, -137.663147, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 115.973221, 68.098656, -146.530090, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 114.713570, 67.625000, -143.377502, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 52.486435, 62.308422, -165.237076, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 47.644001, 62.305508, -174.715576, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 56.222466, 63.667103, -168.534195, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 51.465408, 62.292175, -167.113373, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 115.337288, 76.675690, -190.652710, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 124.189346, 79.572144, -191.947861, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 32.338299, 61.946495, -192.012360, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'beecloud_57' ) , 5, 91 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -0.009339, 56.475613, -164.606705, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 23.313643, 60.965805, -188.869537, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 132.576660, 84.558853, -214.791580, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -27.866758, 50.403988, -112.145859, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -22.229101, 52.105640, -126.614952, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 109.155701, 75.448906, -196.027115, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 84.136543, 65.626106, -159.680511, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -6.210106, 58.112301, -202.417557, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'goblinfisher_769' ) , 5, 91 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 118.425201, 49.484989, 10.177730, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 117.565399, 49.175140, 13.275840, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 131.630295, 52.191109, 0.493474, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 132.709000, 52.181438, 1.958378, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 115.385597, 49.234230, 11.315280, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 119.187698, 52.657040, -17.502140, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 115.246078, 51.459473, 0.485654, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 105.423264, 48.900520, 14.196040, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'pukhatchling_341' ) , 6, 108 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -146.599762, 41.054874, -20.094616, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -144.017395, 42.810432, -34.186378, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -151.625854, 41.554680, -26.096842, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -88.918823, 43.204742, -17.722685, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -66.965546, 48.252819, -102.441193, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -43.827671, 46.200661, 19.798168, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -88.788368, 45.940002, -76.557014, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -92.941093, 46.645500, -87.251610, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -95.979286, 46.592018, -79.841980, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -93.820442, 43.197647, -20.644436, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -97.025192, 44.894878, -44.410561, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -80.286346, 41.722137, 35.408527, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -37.407791, 46.238487, 31.785645, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -38.814682, 46.454853, 21.565491, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'pugil_383' ) , 6, 108 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -184.277756, 41.351612, -114.713394, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -169.266388, 40.687962, -61.911877, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -166.801147, 40.699997, -64.838356, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -101.616592, 45.212582, -124.887360, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -69.954361, 45.725876, -168.462494, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -72.238197, 45.842312, -175.969131, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -72.504135, 45.709385, -170.983658, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 21.688540, 55.237114, -249.336975, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 21.221603, 55.142979, -251.206650, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 54.021748, 57.039089, -254.211136, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -113.482796, 43.995758, -128.084473, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -40.277176, 47.483330, -213.903809, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'beecloud_57' ) , 6, 108 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -118.327293, 45.760178, -76.024277, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -72.675735, 42.961151, -44.501488, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -118.782242, 42.689823, -6.933394, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -41.639767, 45.214169, 48.610859, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -56.309303, 45.660477, 5.984929, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'tinymandragora_118' ) , 7, 126 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -158.192322, 41.106590, -259.243225, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -157.207184, 41.086460, -260.163269, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -63.083252, 53.688164, -278.163940, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -61.458576, 54.025280, -276.558777, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -75.620689, 51.382935, -245.781509, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -74.856087, 51.634296, -246.516800, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -74.512016, 51.628036, -245.741226, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -34.785534, 55.625523, -241.429657, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -41.291142, 55.412819, -245.904037, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -36.349129, 55.578960, -242.701019, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -9.669804, 58.343464, -263.162811, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -9.807606, 58.136826, -264.724731, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -94.023582, 48.623371, -195.581924, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -99.659416, 48.012768, -197.962555, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -89.964874, 45.076744, -291.723206, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -89.894981, 45.337498, -289.692657, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -70.786194, 52.336086, -244.533859, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -69.183395, 46.165981, -305.605804, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -128.199341, 42.753056, -284.560211, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -108.601761, 40.910500, -323.565857, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -108.082520, 41.069489, -322.295532, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -107.989319, 40.836521, -325.645508, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -54.465107, 45.273018, -370.755737, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -84.872406, 40.256310, -352.051361, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -92.191818, 39.770813, -345.820923, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -46.554394, 46.347958, -350.959320, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -46.473343, 46.482601, -347.291534, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -50.033226, 45.865627, -371.026489, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -53.798931, 45.616169, -348.236267, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -100.499832, 47.053680, -242.012115, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -103.995613, 46.643417, -239.056519, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -86.179993, 50.484299, -262.635132, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -91.691269, 48.634628, -262.121002, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -86.452660, 50.134514, -264.685852, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -31.531996, 54.714878, -264.603302, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -99.645760, 47.782211, -202.084732, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'bogy_342' ) , 7, 126 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -46.821171, 26.648108, -144.725708, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -66.548843, 26.669088, -132.981705, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -70.434685, 26.604877, -147.973160, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -57.879177, 25.679827, -158.735397, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -53.083721, 25.258137, -153.525589, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -57.542942, 28.538513, -107.222115, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -49.779339, 27.603992, -128.726578, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -53.617275, 26.943687, -131.619720, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'beecloud_57' ) , 7, 126 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -142.926392, 40.314911, -290.996735, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -136.354324, 40.829044, -294.772430, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -48.029114, 54.278446, -241.896179, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -51.581413, 47.112206, -311.481201, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -59.413441, 46.402538, -320.133301, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -50.052662, 45.887260, -356.489929, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -79.738419, 52.048374, -261.417542, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'goblingambler_769' ) , 7, 126 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 141.935989, 51.884037, 14.806472, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 127.126289, 50.907925, 8.929708, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 111.503899, 49.330059, 5.172480, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 131.747849, 54.673080, -4.795078, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 101.787727, 49.467583, 3.458449, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'woundedaurochs_323' ) , 8, 143 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -133.282837, 45.754066, -217.522751, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -137.267136, 45.618862, -216.675995, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -160.235107, 44.624092, -218.372223, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -145.960434, 46.086548, -197.344772, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'pukhatchling_341' ) , 8, 143 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -200.232101, 40.129150, -261.332977, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -183.795349, 41.687798, -245.081512, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -185.965454, 40.926170, -254.748978, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -229.571594, 38.839432, -179.839996, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -193.934723, 41.542332, -149.620667, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -199.423264, 42.497814, -139.297287, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -178.735687, 43.134167, -176.989685, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -128.948746, 47.443077, -164.533234, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -120.582161, 47.869087, -173.918777, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -123.605011, 47.818863, -162.689804, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'beecloud_57' ) , 8, 143 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -176.681824, 41.645901, -248.407944, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -213.774139, 38.813259, -150.218536, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -178.535583, 43.628948, -203.078415, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'groundedpirate_348' ) , 9, 160 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -58.565269, 51.362320, -226.270996, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -71.680878, 50.965340, -233.694061, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -63.299820, 50.321152, -220.334595, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -70.530807, 50.187229, -223.000702, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 134, ( SELECT id FROM bnpctemplate WHERE name = 'groundedraider_349' ) , 9, 160 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -52.816235, 53.229298, -235.326721, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -64.206528, 51.132904, -224.558258, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -61.834114, 52.017464, -231.658936, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -64.276390, 50.332390, -220.639801, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 10, 192 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -54.290398, 40.322010, 573.227905, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -60.314915, 40.110245, 575.792114, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -23.620897, 57.285927, 508.625763, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'wildjackal_138' ) , 10, 192 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -90.468094, 58.483242, 496.386566, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -81.365952, 51.727959, 549.140564, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -80.817833, 56.661560, 537.505066, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -53.038486, 40.361443, 594.924194, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -52.582077, 40.264317, 598.391479, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -47.518322, 40.373714, 589.616760, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -81.468704, 60.077606, 502.455170, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -16.901297, 60.020233, 483.755493, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -57.339584, 55.511475, 507.494324, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -73.153000, 61.332344, 500.107452, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -26.130857, 46.304897, 551.232422, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 11, 217 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 219.374115, 20.953936, 790.655029, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 143.236206, 21.654545, 825.135742, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 68.660950, 19.804104, 781.593994, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 65.304710, 19.838562, 780.547974, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'firefly_306' ) , 11, 217 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 248.744324, 8.199000, 801.542908, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 243.316299, 6.389911, 769.215210, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 248.922058, 6.183510, 770.405029, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 247.742157, 7.694178, 784.369446, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 247.827148, 7.973563, 787.824646, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 249.842758, 7.710939, 787.673218, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 254.667450, 6.616430, 780.404114, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'megalocrab_326' ) , 11, 217 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 213.886414, 25.659513, 805.622131, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 120.811371, 25.102345, 819.271606, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 130.967728, 24.257393, 811.500610, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 89.266502, 21.719769, 801.784729, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 24.453007, 16.388350, 783.661865, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 137.162354, 21.831797, 781.869629, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 80.695816, 25.808521, 757.471802, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -20.255661, 9.615396, 805.790283, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 63.823036, 57.064499, 724.493225, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 81.239830, 51.769058, 684.438110, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 76.414261, 50.861782, 682.068054, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'wildjackal_138' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 80.595825, 48.787796, 645.855713, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 73.068626, 48.266430, 631.182983, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 83.219879, 56.385124, 716.791199, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 50.848076, 54.702995, 729.259705, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 76.545219, 56.787682, 715.667419, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 37.024426, 35.792965, 690.217041, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 45.733669, 37.499966, 688.096008, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 86.624710, 51.260124, 640.301331, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 45.228138, 37.099724, 660.023499, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'mosslessgoobbue_1447' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 202.664322, 47.130844, 40.074265, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 99.854713, 46.477989, 90.732613, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 195.101822, 51.360214, 245.328018, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 72.700020, 51.071037, 160.793518, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'Morabymole_205' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -55.088406, 38.074795, 664.306946, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -55.645992, 38.772026, 660.599365, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -16.556934, 42.180382, 708.252197, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -48.496529, 39.269810, 663.201782, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -51.500923, 37.012867, 674.528015, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -6.145434, 42.288139, 706.083801, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -9.199514, 40.592983, 632.030334, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -2.834037, 40.855797, 621.834290, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 2.077995, 42.645485, 625.443604, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -127.880661, 8.199225, 662.265625, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -130.271301, 8.760700, 653.775574, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -74.043037, 3.029166, 802.280579, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'megalocrab_326' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -167.360901, 0.192970, 741.616821, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -210.105789, 0.192970, 665.192383, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -115.657036, 3.732756, 702.174438, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -214.088989, 0.192970, 695.820801, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -227.347412, 0.192970, 686.557373, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -90.666428, 6.567122, 686.000122, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -119.962639, 0.833841, 754.274231, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -129.574051, 0.366468, 756.930542, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -78.763962, 1.965495, 762.245728, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -84.255234, 2.316301, 807.157654, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'Qiqirneggdigger_771' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -152.054932, 4.573110, 658.858643, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -142.595551, 6.078611, 660.024963, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -160.952896, 1.569027, 667.861206, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -161.990494, 1.669328, 666.421692, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -154.867004, 1.251185, 682.037842, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -149.620605, 3.102985, 669.616089, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -140.565781, 1.617873, 716.305237, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -148.567505, 0.750069, 714.199524, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -149.139404, 0.759766, 712.362000, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 14, 293 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 16.537346, 44.088127, 834.352844, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 129.156769, 48.701702, 870.370544, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'wildjackal_138' ) , 14, 293 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 31.790197, 46.105656, 848.701172, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 33.608295, 45.270161, 818.972778, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 39.663425, 45.700741, 821.791626, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -21.545862, 42.715298, 761.550659, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -23.999332, 42.612450, 757.071289, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 79.315750, 48.374645, 869.111389, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'mosslessgoobbue_1447' ) , 17, 369 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 427.836945, 80.021965, -349.248810, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 565.216431, 83.095825, -306.819336, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 455.473480, 67.810539, -123.630386, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 375.830872, 66.879967, -107.765045, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'wharfrat_347' ) , 1, 44 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 64.294533, 57.287041, 100.836075, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 37.434448, 64.481537, 64.159660, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 38.694130, 63.733395, 68.799767, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 36.532879, 63.661598, 72.839180, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 30.264307, 64.356834, 69.366142, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 26.045307, 64.700050, 69.941322, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 31.921568, 59.784504, 131.917343, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 65.174042, 55.436501, 110.212471, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 62.116161, 57.291229, 105.807106, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 68.838654, 54.671867, 108.062912, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -3.651297, 66.863014, 134.103897, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 2.938428, 65.401749, 136.624969, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 26.469887, 60.747574, 155.960098, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 28.735464, 60.314034, 151.299133, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 18.797560, 62.371342, 146.850464, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 15.261803, 63.832664, 106.379623, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 8.741608, 65.253212, 92.257599, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 10.913162, 64.974815, 95.179398, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'littleladybug_49' ) , 1, 44 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 52.863117, 60.588356, 101.507233, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 29.030218, 63.985119, 76.442604, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 31.129930, 64.289429, 69.652756, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 27.530689, 60.966793, 122.992928, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 17.288868, 62.641926, 152.854385, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 26.169344, 60.889542, 143.065704, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -4.847337, 67.396812, 93.828651, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 19.027699, 63.512241, 104.713951, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 15.466980, 64.467873, 94.719208, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 9.859295, 65.085213, 95.879517, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'wharfrat_347' ) , 2, 51 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 62.250587, 61.661640, 69.098907, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 83.971352, 49.198536, 165.746689, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 73.846367, 53.816826, 184.504410, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 75.251656, 55.495728, 83.890091, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 53.773689, 55.349224, 146.168808, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 61.102898, 56.397987, 192.556747, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 57.251907, 56.542641, 184.209198, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 57.748695, 57.034107, 194.153549, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 95.792671, 49.618786, 77.402550, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 112.716331, 42.433197, 102.106140, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 51.801235, 55.842659, 148.313049, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 82.123383, 49.023922, 159.378052, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 114.893135, 41.848457, 102.787659, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 69.008430, 53.216988, 116.434280, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 79.652199, 53.238319, 90.122620, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 126.246452, 41.570320, 140.122253, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 99.747833, 44.100784, 123.993179, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 113.454712, 42.345196, 100.948547, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'littleladybug_49' ) , 2, 51 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 45.571033, 57.356201, 150.570984, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 54.304482, 55.216850, 151.417862, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 56.113060, 56.823566, 191.221069, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 54.058884, 55.278248, 143.906418, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 84.773232, 48.285912, 155.548477, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 96.166550, 49.865639, 74.718452, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 85.432297, 51.678909, 87.332741, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 99.098320, 48.875435, 75.065170, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 66.143730, 59.490005, 78.265450, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 99.377922, 44.330078, 130.574432, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 101.169579, 44.106537, 130.386093, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 71.143463, 54.169704, 106.052872, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 66.322388, 54.924107, 184.590073, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 107.798225, 43.411076, 104.886528, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'aurelia_324' ) , 3, 59 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 117.880043, 67.458412, 296.623932, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 146.188293, 56.939262, 245.259857, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 152.376389, 55.812046, 253.175720, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 218.216965, 52.296589, 260.076874, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 250.545639, 36.017284, 235.457108, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 247.294846, 38.279060, 237.271759, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 184.790344, 57.019611, 269.565765, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 183.965454, 56.715187, 268.115601, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 231.187881, 34.652035, 207.873764, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 224.039474, 36.268261, 204.835510, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 196.098526, 47.213280, 225.738007, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 227.140305, 29.550524, 166.387589, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 179.416321, 44.062424, 196.894440, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 181.006363, 43.680195, 196.869965, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 194.137177, 47.895237, 228.178833, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 153.964737, 64.167671, 315.198730, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 155.200058, 63.085449, 309.499878, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 152.957993, 63.655045, 311.873932, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'littleladybug_49' ) , 3, 59 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 111.903336, 68.743546, 300.661255, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 112.897453, 68.324715, 295.133606, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 152.350342, 58.937344, 274.565033, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 187.742783, 55.044521, 261.096619, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 216.307541, 51.503906, 257.291656, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 210.699219, 52.011250, 257.106445, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 242.165085, 38.392544, 233.739548, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 187.012482, 45.573689, 216.676331, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 229.088959, 35.555225, 208.886688, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 219.446045, 30.751472, 160.489532, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 215.104324, 31.385826, 159.672028, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 202.646469, 37.279289, 176.293274, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 177.782684, 44.458412, 196.410294, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 152.618759, 64.436661, 316.207001, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 151.824402, 58.862495, 273.164246, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 414.480591, 55.605923, -19.244616, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 411.791534, 54.457600, -15.883924, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 340.543945, 47.122749, 2.214485, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 341.583160, 59.172894, -66.581017, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'rivertoad_313' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 109.464691, 38.519886, 10.684659, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 129.973785, 37.234180, 46.013535, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 124.570610, 38.011002, 11.701272, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 112.236008, 38.309334, 7.205370, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 158.442062, 34.370682, 80.349533, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 201.666260, 27.524975, 92.516258, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 167.294083, 33.590755, 69.887001, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 153.883469, 34.846092, 74.288155, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'aurelia_324' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 242.986801, 44.935120, 43.373550, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 224.098328, 52.458633, 24.242342, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 225.999817, 50.733646, 30.041693, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 216.458954, 52.403118, 26.247066, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 283.880951, 44.155113, 49.234337, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 283.263702, 41.858246, 62.531952, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 147.989014, 38.185940, 43.552074, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 144.362808, 37.922974, 41.341286, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 239.468414, 43.743702, 48.086830, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 183.534637, 41.262024, 52.110279, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 189.437561, 44.447548, 45.937778, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 184.753876, 43.332886, 47.189186, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 244.019852, 36.014511, 69.926308, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 239.753937, 35.597179, 70.454971, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'wilddodo_339' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 368.136200, 50.403240, -13.734234, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 451.027985, 66.161713, -72.315598, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 449.639343, 65.303894, -30.821619, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 442.088135, 64.160156, -40.026783, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 455.870239, 55.518864, 3.272704, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 452.671356, 58.115013, -5.166701, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 446.943329, 54.652969, 9.564107, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 414.063202, 63.229794, -82.102165, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 406.717987, 63.644306, -86.204910, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 363.379822, 49.732506, -10.085771, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 302.224060, 47.922523, 0.497604, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 303.791046, 48.713047, -2.706928, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 343.845428, 52.141602, -31.888533, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 360.562195, 62.739830, -82.151413, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 368.901367, 59.727901, -61.852295, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 366.609436, 58.438030, -55.536110, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 378.224823, 59.231499, -57.050884, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'littleladybug_49' ) , 4, 68 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 220.581940, 54.029053, 19.279335, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 220.587646, 43.731007, 50.083656, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 204.658096, 42.179863, 52.989445, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 198.983627, 30.358673, 80.954002, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 222.884781, 51.949562, 26.155874, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 152.354279, 39.774525, 40.408192, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 282.209137, 43.212093, 55.520477, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 189.975784, 40.889244, 55.307251, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 210.336929, 42.171211, 53.502865, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 237.494446, 35.801193, 69.936287, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 272.746399, 46.054150, 36.030727, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'tinymandragora_118' ) , 5, 91 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 419.832550, 66.125008, -151.399826, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 420.032501, 66.434593, -160.272156, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 441.862000, 65.614815, -126.050018, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 420.231934, 66.234299, -158.144501, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 440.404388, 65.763298, -128.258789, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 434.575104, 65.704308, -127.933617, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 477.989105, 66.571220, -146.671173, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 467.847137, 66.867813, -148.765076, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 396.368256, 67.786751, -122.644615, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 389.902344, 68.438660, -120.238037, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 388.816010, 68.861168, -123.025856, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 351.695587, 69.927399, -125.725754, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 357.954834, 69.522141, -123.606110, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 338.487183, 69.478577, -132.456451, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 356.440216, 68.663689, -118.765343, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 382.010651, 70.166397, -134.019211, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 381.114655, 70.161736, -143.352936, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 390.056458, 69.155167, -140.515961, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 379.822540, 70.397919, -137.378250, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 5, 91 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 353.897919, 71.613380, -144.669220, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 351.686157, 71.083435, -140.461899, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'nestingbuzzard_12' ) , 6, 108 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 563.318542, 74.410683, -271.810699, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 558.802734, 74.299782, -270.912262, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 562.022949, 67.962524, -227.877182, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 561.874817, 68.546982, -232.569168, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 568.347595, 73.577438, -268.564087, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 528.827637, 77.612038, -287.096863, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 529.415894, 79.599213, -294.353790, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 538.748596, 75.058891, -274.535675, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 526.682312, 69.835686, -239.749542, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 530.122192, 69.797562, -239.787460, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 519.848328, 69.790367, -238.733307, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 503.513336, 71.486565, -253.849579, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 7, 126 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 636.123718, 70.413269, -279.500397, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 630.403748, 72.509262, -286.077087, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 390.160156, 79.890434, -358.783234, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 406.324982, 88.096336, -399.940216, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 409.124756, 87.158852, -397.583557, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'wilddodo_339' ) , 7, 126 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 608.237366, 70.946320, -265.898285, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 610.655884, 69.939163, -263.038879, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 605.864258, 71.952057, -270.677063, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 486.796844, 72.703178, -272.439667, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 391.271698, 69.652451, -264.843475, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 386.010254, 71.401779, -254.654022, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 381.482727, 72.436256, -254.333282, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 698.577209, 67.180229, -298.386536, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 660.052246, 67.938362, -279.966827, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 650.803711, 68.715714, -280.011780, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 503.492828, 76.159920, -292.720673, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 496.124176, 76.771576, -299.405273, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 432.801544, 71.142204, -298.075897, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 435.050293, 72.245720, -301.558533, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 437.919464, 72.041763, -299.617920, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 358.943481, 73.582802, -315.218323, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 349.780762, 74.740341, -316.816895, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 365.961578, 74.875626, -321.563171, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 368.296844, 74.692383, -319.988922, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'cavebat_38' ) , 7, 126 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 233.810730, 73.586388, -273.787872, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 230.908157, 73.656395, -274.500061, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 220.013351, 75.401123, -303.494843, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 285.320435, 75.578819, -265.805176, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 282.612335, 75.364700, -256.060822, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 278.321503, 73.597031, -235.935959, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 279.102783, 75.624527, -255.437775, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 276.342987, 74.367447, -276.038605, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 273.543701, 74.295868, -280.026184, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 236.170349, 75.241707, -332.495361, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 269.015045, 73.683670, -309.586090, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 294.723572, 76.246216, -320.254028, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 294.432831, 76.617851, -316.516144, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'tinymandragora_118' ) , 8, 143 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 604.106567, 66.095642, -214.137878, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 600.394043, 66.002831, -201.103607, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 612.743591, 61.863049, -153.264847, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 627.916016, 61.467808, -169.797104, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 624.263489, 62.610977, -172.166809, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 648.127930, 61.767151, -181.579208, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 639.136414, 61.900654, -178.588196, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 681.631470, 64.906136, -221.895981, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 683.687561, 64.748779, -220.552322, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 680.251587, 65.090805, -224.182343, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 679.503357, 65.023972, -222.532898, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 677.820679, 65.290237, -226.927368, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 660.814392, 66.431412, -234.368591, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 664.211182, 66.330055, -236.155014, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 659.342285, 66.287399, -229.376236, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 624.711792, 66.610771, -233.029205, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 638.439331, 65.977501, -211.567291, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 631.613281, 66.114395, -213.538193, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 634.585144, 66.187698, -214.315826, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 631.768738, 65.430511, -205.114731, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 623.746887, 66.586647, -229.050339, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 597.572388, 65.932281, -202.829224, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 642.739258, 60.376305, -174.569244, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 612.511047, 62.265327, -155.992722, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 609.297729, 62.941418, -152.494919, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 617.223999, 61.760101, -159.124969, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 581.315125, 63.941509, -162.398743, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 577.759399, 63.908821, -161.433121, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 8, 143 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 724.959839, 64.510010, -239.044235, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 638.208984, 66.948196, -227.057037, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 614.043091, 61.041290, -146.291199, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 622.407227, 62.909519, -172.249405, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 669.547180, 61.896049, -188.504135, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 680.076843, 63.297722, -203.122406, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 676.648438, 60.998432, -187.351532, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'galago_5' ) , 8, 143 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 398.594391, 86.938850, -395.725555, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 385.238983, 81.717377, -370.002289, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 381.627106, 81.745964, -371.062988, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 408.861298, 82.580498, -374.672211, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 415.871094, 84.370522, -384.927032, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 421.558533, 84.224174, -378.451904, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 474.853149, 87.663361, -351.449249, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 461.404541, 85.193039, -345.374939, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 453.884369, 83.996025, -351.491241, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 428.101532, 77.176521, -330.722809, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 393.978424, 76.234848, -331.036102, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 391.122162, 76.014748, -329.418121, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 397.105896, 76.976234, -336.823914, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 9, 160 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 532.470581, 91.520287, -385.161407, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 530.146362, 91.061691, -381.784119, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 585.778381, 89.363602, -386.939697, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 656.953186, 78.282013, -356.964355, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 659.677429, 79.926849, -363.085175, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 652.882446, 78.775528, -358.058838, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'wilddodo_339' ) , 9, 160 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 513.869385, 87.221413, -358.488800, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 595.020081, 99.359871, -474.622345, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 596.605957, 101.166290, -483.939484, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 570.725525, 90.486488, -409.461853, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 639.963989, 75.507866, -317.423309, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 632.261536, 76.737450, -319.611938, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 633.949402, 75.880203, -312.780609, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 582.750244, 77.316277, -287.949646, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 587.057617, 78.599426, -296.115112, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 583.232727, 83.028053, -322.348724, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 553.331421, 86.246201, -343.383331, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 549.962036, 86.221115, -335.880371, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 560.620544, 86.314621, -334.075378, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 592.004578, 86.690178, -364.584747, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 596.683838, 87.444733, -370.492584, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'kobolddustman_752' ) , 9, 160 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 517.050964, 96.222397, -459.080231, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 135, ( SELECT id FROM bnpctemplate WHERE name = 'koboldsupplicant_754' ) , 9, 160 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 540.745300, 96.927368, -467.733673, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 515.891357, 96.243935, -466.257721, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 30, 821 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 372.246185, 28.720036, 741.938660, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 327.128510, 32.244225, 708.033936, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'apkallu_314' ) , 30, 821 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 431.721527, 13.975726, 655.738708, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 432.286865, 13.533363, 675.021545, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 432.038330, 13.436191, 672.796204, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 427.155792, 13.959119, 667.944580, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 428.893768, 15.403847, 728.476685, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 431.970032, 15.034657, 728.005493, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 419.314087, 17.541180, 740.629883, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 432.655792, 14.955267, 728.253418, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 387.256073, 26.918362, 711.608459, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 391.824738, 27.036375, 715.442749, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 387.857025, 27.687635, 714.824097, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 387.999573, 24.816513, 693.751343, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 390.215973, 25.120920, 694.781433, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 348.497864, 31.759195, 729.429321, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 350.386688, 31.448929, 728.785889, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 318.810486, 34.494507, 699.025513, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 302.758575, 37.825691, 702.853455, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 290.597412, 43.343941, 745.739685, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 293.732147, 42.956852, 744.136902, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 366.556915, 34.175179, 254.676575, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 306.056396, 32.084148, 523.375427, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 519.251038, 40.352879, 551.294434, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 522.082275, 41.854961, 545.003601, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 408.845581, 27.656450, 488.111481, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 334.707428, 36.504086, 423.652527, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 284.726166, 42.087921, 402.735870, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 331.623688, 38.916473, 327.954041, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 232.209991, 55.331787, 617.594421, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 309.601624, 36.440109, 593.929993, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 467.868073, 31.961191, 556.752197, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'largebuffalo_322' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 401.396179, 35.054623, 222.734406, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 291.158844, 41.639423, 554.037903, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 382.222351, 23.840349, 526.231934, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 416.445770, 29.053875, 521.701782, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 451.082886, 32.692612, 546.509521, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 338.258728, 30.744928, 455.014282, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 312.520599, 37.736408, 434.084412, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 287.192932, 43.570984, 369.160370, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 302.216888, 40.808041, 354.268921, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 282.005096, 41.719658, 655.549744, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 32, 1003 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 429.784027, 17.786268, 593.056213, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 427.085052, 20.037975, 767.870605, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 445.827515, 13.115939, 700.180786, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'dungmidgeswarm_136' ) , 32, 1003 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -251.967834, 55.243580, 192.459091, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 117.392525, 84.774948, -71.764091, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -133.050049, 53.990719, 636.436096, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -154.149033, 63.531036, 694.353882, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -93.800804, 59.829895, 661.897278, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 139.161118, 75.339279, 18.111082, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 143.705627, 73.825974, 6.568444, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -82.297890, 49.768051, 284.502075, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 0.242683, 41.477894, 294.645935, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 81.170158, 77.173737, -19.728859, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -12.733305, 41.245575, 346.205017, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -15.307009, 42.160084, 346.931152, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -138.975067, 50.036945, 336.339355, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -249.466690, 43.644550, 256.877136, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'giantpelican_178' ) , 32, 1003 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -104.625664, 38.006046, 460.946198, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -97.058182, 40.457481, 509.719421, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -45.960896, 52.462914, 571.532043, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -55.922276, 51.980762, 578.434753, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -5.414613, 49.896057, 509.611755, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -68.915504, 44.210693, 544.967285, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -40.563282, 46.516109, 523.413330, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -49.638638, 44.899216, 519.204956, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'grassraptor_2' ) , 32, 1003 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -247.816727, 50.680946, 207.230743, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -165.673279, 55.549320, 634.470032, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -96.612160, 57.008339, 639.203064, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -238.393372, 43.843601, 239.024277, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -231.185379, 45.833904, 224.204086, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -310.033844, 53.365177, 253.411087, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 117.968750, 77.336281, -36.169071, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 138.729279, 91.027161, -76.475929, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 134.107803, 90.189934, -75.294937, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 109.663414, 87.537735, -90.260155, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -273.921112, 52.281662, 219.633392, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 119.839310, 71.614166, 17.244806, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -106.747353, 60.368134, 674.293457, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -100.673538, 62.803711, 683.443542, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 79.672653, 76.129517, -8.622675, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -93.922867, 62.861301, 680.264038, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 125.975220, 83.588005, -59.488007, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -164.992828, 62.249355, 682.125305, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -162.238342, 61.626869, 681.015198, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 82.699371, 78.790428, -59.445129, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'snipper_325' ) , 32, 1003 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 504.239563, 9.219303, 685.512695, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 472.254883, 10.564069, 726.620361, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 463.649567, 11.310349, 698.085510, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 465.627777, 12.656516, 602.219116, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 505.001068, 9.415708, 632.124390, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 484.161926, 10.010633, 644.091370, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 479.783447, 9.435391, 763.075867, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 491.271393, 9.295449, 757.102295, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'corkbulb_384' ) , 32, 1003 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -169.711227, 48.139221, 183.802261, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -164.758163, 47.074829, 192.599335, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -146.419083, 48.265182, 173.729431, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -156.414856, 49.196289, 171.626007, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -150.229843, 48.627834, 172.936539, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -92.152237, 46.671131, 177.070511, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -97.935814, 46.450417, 178.284103, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -107.492027, 43.030487, 199.119522, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -119.821083, 39.551929, 204.728775, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -132.937134, 48.119797, 170.243561, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -108.902214, 42.397972, 199.993027, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -60.683254, 41.885715, 202.716248, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 457.895386, 14.607802, 272.320496, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 464.343353, 13.820408, 277.345978, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 439.958099, 16.836380, 332.653015, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 427.443237, 36.219193, 127.508369, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 437.561188, 34.641438, 198.739212, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'dungmidgeswarm_136' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -114.906540, 45.180805, 408.725342, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -151.086990, 51.171707, 568.910889, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -308.923279, 45.098831, 464.539001, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -302.912323, 44.708927, 461.839172, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -241.525604, 44.868385, 494.086975, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -232.489197, 45.362839, 567.486084, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -193.868896, 53.098679, 610.272888, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -198.784103, 52.273563, 605.728699, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -276.964813, 44.047970, 328.564941, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -208.194763, 41.863541, 383.252441, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -203.964371, 41.149185, 379.679016, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -184.629547, 34.494732, 256.320251, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -74.019539, 34.731869, 223.876038, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'gigantoad_26' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -323.569305, 46.080910, 364.520782, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -197.242493, 34.694187, 264.061066, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -119.788895, 35.770496, 242.080597, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -131.930069, 35.678688, 237.568268, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -232.206055, 34.845417, 295.551453, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -63.805229, 35.052498, 220.223587, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'Bloodshorebell_312' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 539.988159, 10.728779, 201.962463, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 508.702332, 9.843376, 210.636063, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 488.300049, 11.344833, 231.362061, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 512.723206, 9.212793, 222.065933, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 481.537384, 11.387406, 252.843628, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 525.416382, 9.520628, 250.390350, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 516.614746, 9.196991, 265.035309, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 510.098602, 9.718414, 210.246414, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'goobbue_320' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -142.779907, 45.538643, 390.789978, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -8.204351, 40.733112, 387.741608, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -53.786427, 44.073502, 393.556488, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -149.590973, 54.865368, 620.933411, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -220.394562, 52.914051, 601.973694, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -140.082657, 48.086334, 541.116150, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -211.088623, 39.729519, 368.213989, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -213.953491, 47.186401, 443.753571, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -195.193054, 47.639656, 498.962738, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -277.234406, 44.030235, 334.434814, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -257.839233, 45.907104, 522.402100, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -196.695114, 46.416176, 571.984924, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'colibri_386' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 522.765137, 30.365868, 187.004410, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 516.769836, 31.304415, 186.869141, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 444.407501, 36.752094, 115.708374, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 430.489563, 36.679100, 101.818298, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 427.955902, 36.557060, 103.377113, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 475.375275, 31.951229, 214.381836, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 483.411194, 43.005402, 164.453827, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 511.686005, 49.788960, 136.333237, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 500.406738, 46.853142, 143.340286, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 415.773193, 35.943077, 154.037125, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 416.130280, 34.927956, 166.278198, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 427.614624, 35.188046, 171.682129, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 451.695526, 36.421738, 194.230072, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 457.050262, 13.037590, 185.272095, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 456.832764, 12.846014, 149.105515, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'junglecoeurl_117' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -87.302818, 61.613789, 350.757111, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -121.799904, 52.516403, 326.409454, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -102.978989, 46.322708, 283.227692, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -143.837524, 40.508278, 285.981903, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -186.847992, 38.187733, 344.288849, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -170.481018, 40.745045, 317.857147, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -146.847977, 48.664265, 344.132172, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -126.912247, 48.245762, 314.641449, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 333.649597, 38.490589, 164.717346, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 327.680969, 39.330353, 169.159546, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'dungmidgeswarm_136' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -87.352127, 45.814068, 567.012634, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -24.314640, 52.265717, 546.747131, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -85.086487, 37.975540, 475.008118, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'mildewedgoobbue_321' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -226.688431, 44.764317, 553.852051, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'koboldpatrolman_328' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 327.476135, 36.519455, 219.916962, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 318.658203, 37.686790, 233.860397, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 322.804413, 37.674561, 206.378204, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'koboldpitman_329' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 313.557495, 38.419243, 219.506363, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 325.863403, 37.460819, 205.065903, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 316.045197, 38.194221, 236.654907, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = 'koboldmissionary_331' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 339.655701, 36.864342, 239.408051, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 315.073486, 38.121010, 233.173004, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 316.614807, 40.290474, 194.957336, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = '2ndCohorthoplomachus_55' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 472.982330, 76.196999, -58.989597, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 371.606262, 76.322876, -20.744659, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 187.608551, 74.710724, -2.765123, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 285.295349, 76.650215, -0.718120, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = '2ndCohortlaquearius_61' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 444.150146, 76.196999, -8.852811, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 297.365143, 76.319992, -19.353390, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 431.955353, 76.196999, -108.918213, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 205.328918, 73.958359, -23.871384, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = '2ndCohorteques_62' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 354.466187, 76.065430, -67.588791, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 389.015991, 76.084824, -102.386803, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 481.615387, 77.197006, -107.208000, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 429.465088, 76.203674, -63.431820, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 436.628632, 76.196999, -101.585655, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 228.454910, 75.939194, -8.190249, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 242.298004, 74.848045, -23.727840, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 316.697388, 76.196999, -39.613617, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 387.136505, 76.397003, -61.814331, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 413.997803, 76.325714, 0.872293, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 335.799988, 76.196999, -11.489540, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = '2ndCohortsecutor_63' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 452.249542, 76.228813, -128.922562, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 301.524933, 76.289238, -16.579481, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 205.523087, 75.581001, -33.315983, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 411.744904, 76.196999, -5.216177, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = '2ndCohortsignifer_64' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 359.907318, 76.619888, -39.989422, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 401.510406, 79.863983, -80.450699, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 336.851501, 79.863983, 1.148477, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 336.851501, 79.863983, -34.551071, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 211.275253, 74.969193, -10.168123, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 275.107452, 76.457809, -22.407925, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 376.375610, 79.997002, -55.369541, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 474.943909, 76.196991, -97.530579, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 448.056213, 79.863983, -48.739960, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 137, ( SELECT id FROM bnpctemplate WHERE name = '2ndCohortvanguard_201' ) , 50, 2778 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 355.095093, 76.213654, -93.768280, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 368.403473, 76.478249, -103.176918, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 451.683380, 76.196999, -97.358223, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 465.146515, 76.196999, -78.248222, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 432.725006, 76.196999, -41.925694, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 393.013885, 76.262604, -41.708679, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 10, 192 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 661.376892, 16.868380, 444.546478, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 600.877197, 5.880996, 485.953308, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 598.322144, 5.898227, 483.624512, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'roseling_22' ) , 10, 192 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 747.951599, 50.427887, 357.928772, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 750.353027, 50.083611, 360.748383, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 743.340820, 44.356922, 397.143066, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 678.437561, 19.654554, 435.200378, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 667.057800, 20.397568, 429.583344, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 741.121460, 28.184546, 441.007660, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 734.497192, 26.854353, 442.302002, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 672.214539, 14.595839, 442.895569, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'wildjackal_138' ) , 11, 217 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 719.658081, 40.786228, 365.821228, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 715.957581, 39.597771, 371.410339, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 657.032166, 41.796482, 338.018616, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 687.857300, 42.032818, 339.103790, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 677.403137, 41.886250, 357.998016, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 696.959045, 28.637814, 408.641937, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 694.449768, 34.261051, 390.357208, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 706.790405, 28.210888, 410.849121, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'sewermole_205' ) , 11, 217 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 610.036804, 35.572445, 344.129456, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 608.844360, 34.301891, 347.554077, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 589.346008, 29.897394, 350.330688, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 619.494202, 27.583639, 374.089874, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 621.858521, 29.944971, 367.900574, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 619.407898, 29.057913, 369.502777, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 586.461548, 28.951075, 351.303070, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 585.813171, 28.438513, 352.369751, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'fatdodo_340' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 622.800171, 41.141388, 327.561768, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 622.963623, 41.739059, 320.949005, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 602.817566, 30.726345, 355.777466, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 617.181580, 32.516930, 357.289886, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 643.447693, 23.634590, 398.243011, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 635.017883, 24.391804, 392.765808, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 635.004395, 20.669270, 404.579987, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 598.226685, 25.550039, 368.222595, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 634.595825, 42.144840, 321.818115, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'arborbuzzard_12' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 506.149567, 2.814311, 418.210938, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 516.260681, 1.855386, 421.547974, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 448.871796, 9.227687, 418.364410, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 511.570709, 3.457108, 411.553375, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 461.846924, 12.663937, 362.355682, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 450.908691, 9.735098, 386.559052, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 457.675018, 10.103431, 384.870239, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 490.583740, 8.330388, 397.629272, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 14, 293 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 510.636200, 16.715385, 353.222382, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 448.888367, 5.203311, 276.677948, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'fatdodo_340' ) , 14, 293 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 522.148376, 23.025820, 338.460297, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 549.980774, 37.888100, 297.108398, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 560.540100, 24.185499, 348.622803, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 557.885254, 29.173893, 333.929108, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 554.530212, 29.420858, 329.752747, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 562.316833, 33.890800, 318.024475, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 503.762207, 17.623161, 322.609985, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 514.717102, 22.343367, 297.317657, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 529.777893, 26.199690, 320.881897, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Rhotanobuccaneer_348' ) , 14, 293 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 611.903076, 43.327553, 310.701385, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 607.670898, 42.955601, 306.352112, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 601.489197, 43.952782, 299.576599, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 607.933411, 44.651409, 294.689972, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Rhotanobuccaneer_349' ) , 14, 293 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 590.237366, 46.126652, 286.961273, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 585.551025, 44.082901, 293.967102, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 600.182373, 43.941280, 299.534485, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 604.942139, 46.820461, 284.395782, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'hedgemole_206' ) , 15, 319 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 240.009308, -11.875637, 94.363434, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 236.622910, -12.374062, 95.346664, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 270.845459, -9.754198, 101.272354, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 268.099945, -9.356598, 95.027283, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 267.954834, -8.345027, 88.461983, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 242.214783, -13.903976, 118.906860, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 249.788513, -12.784965, 108.927460, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 248.353348, -13.125180, 119.497467, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 218.270966, -15.558857, 108.854996, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 222.898697, -14.414904, 103.984398, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'pukhatchling_341' ) , 15, 319 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 301.762268, 3.169765, 70.885086, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 291.185822, -11.798216, 131.701752, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 346.115662, -19.054857, 220.172867, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 414.560944, -7.906649, 201.375565, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 414.154724, -8.001914, 208.562607, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 308.206299, 3.224269, 66.798668, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 303.874359, -13.722762, 140.560760, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 298.710693, -14.609919, 146.761963, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 307.000458, -20.029356, 160.336914, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'duskbat_38' ) , 15, 319 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 220.115234, -12.237656, 93.315231, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 278.200012, -9.068469, 105.533852, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 264.399048, -16.985626, 162.506134, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 266.914124, -16.392138, 157.156372, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 324.282349, -4.017180, 105.255798, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Rothlytpelican_181' ) , 16, 344 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 134.495255, -15.960920, 55.492996, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 162.879456, -14.323977, 79.460434, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 173.172256, -12.719238, 113.497765, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 195.181580, -8.629279, 65.083954, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 119.722115, -17.771116, 161.300476, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 93.570320, -15.437970, 163.421646, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 86.031578, -15.878393, 123.544548, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 127.459404, -14.926886, 94.082710, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'duskbat_38' ) , 16, 344 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 53.393642, -1.974696, -13.929848, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 50.976189, -2.045702, -13.768462, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 74.400002, -2.953552, -16.400000, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 384.199646, 14.428646, 32.482605, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 172.820511, -14.820461, 60.165451, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 3.016516, -22.292753, 53.719463, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 365.071075, 4.564421, 80.886124, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 366.787872, 4.598518, 83.138847, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 151.129349, -12.239421, 101.233078, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 149.609390, -12.477910, 100.059769, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'killermantis_397' ) , 16, 344 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 51.943352, -3.992505, -26.552906, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 34.919285, -3.706397, -31.336760, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 65.056923, -3.885968, -62.313755, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 99.506714, -10.486404, 8.971105, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -19.148802, -22.535498, 50.525768, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -14.729313, -22.401009, 41.722015, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 24.571882, -23.505068, 112.018021, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 6.203632, -24.387508, 109.371689, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 5.153160, -22.274078, 64.863579, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'firefly_306' ) , 19, 420 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 86.519829, -0.915667, -68.345375, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 74.276382, -2.694968, -61.816307, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 86.460457, -1.391993, -58.048004, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 89.436523, -0.989940, -60.869198, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 82.697441, -2.455795, -50.182808, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 77.607559, -2.221285, -61.116398, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'preyingmantis_396' ) , 40, 1732 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -279.919220, -39.905281, 656.459167, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -275.170227, -39.782280, 655.657288, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -253.976105, -37.625439, 564.579956, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -314.709747, -38.249912, 623.179077, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -343.226685, -40.837242, 665.661011, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -389.110626, -40.132030, 655.361572, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -365.610077, -39.364208, 701.057129, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -242.819107, -37.835190, 663.537170, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'plasmoid_46' ) , 40, 1732 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -367.344208, -39.756889, 693.627441, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -258.862610, -38.845234, 656.123657, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -290.473724, -38.221050, 625.219788, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -210.641068, -38.717575, 499.031586, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -249.695206, -37.244095, 497.706360, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -221.257446, -38.644001, 506.923462, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -240.924347, -36.732006, 477.895660, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -259.013824, -39.834621, 440.567963, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -288.734344, -39.829880, 425.177887, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -306.641113, -40.615318, 415.293915, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -294.500275, -39.220528, 433.955505, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -227.037277, -38.624527, 514.310486, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -244.434479, -37.127861, 547.532959, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'lammergeyer_403' ) , 41, 1837 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -450.986206, -37.787945, 738.352051, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -476.749207, -37.986050, 757.037903, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -483.847992, -37.370193, 736.790588, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -449.547180, -37.671715, 733.113403, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -502.139069, -36.506023, 743.624451, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -448.947144, -36.675556, 703.180054, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -474.291046, -36.357124, 712.860901, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'plasmoid_46' ) , 41, 1837 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -240.666382, -41.931458, 742.759705, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -333.599945, -41.347382, 708.581604, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -333.698303, -41.775959, 714.647217, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -290.457306, -41.281891, 688.647827, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -242.258255, -40.055676, 710.315002, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'deadmansmoan_20' ) , 42, 1941 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -226.771606, -41.212288, 735.835693, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -346.306793, -41.448574, 720.441650, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -317.640503, -41.655495, 697.187317, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -308.085052, -41.953552, 708.300720, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -286.262238, -41.513474, 697.558167, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -262.640625, -41.512302, 722.137085, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -231.341949, -41.249001, 734.726685, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'plasmoid_46' ) , 42, 1941 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -438.858093, -34.486282, 671.690613, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -444.367584, -36.737885, 712.967957, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -468.395172, -37.043217, 719.711182, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -469.749176, -37.181816, 722.876709, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -469.493256, -37.631023, 748.576294, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'whelkballista_2835' ) , 44, 4300 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -96.910004, -30.450001, -92.839996, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -91.264221, -30.197689, -128.465698, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -84.733398, -29.587280, -110.399101, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -118.730499, -32.303410, -133.012894, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -103.441002, -31.479370, -116.075401, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -166.464432, -35.424061, -11.169662, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -204.166534, -39.734409, -90.640930, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -192.958786, -40.200939, -43.811974, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -54.541470, -23.889269, -92.920448, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -227.317398, -40.194572, -88.486130, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -158.070892, -33.927280, -101.886833, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -89.532974, -29.059402, -141.626770, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -59.227985, -24.572134, -117.284523, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -129.817825, -32.226665, -109.254219, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -189.200836, -38.028507, -83.829842, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -146.513153, -30.945234, 1.708608, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shelfscaleSahagin_765' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -213.979187, -40.301193, -87.161430, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -38.060734, -21.651909, -161.480682, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -75.913696, -28.427610, -146.562897, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -155.277664, -34.216839, -89.592522, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -143.651108, -26.894556, 20.560968, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -118.166702, -32.339401, -135.991302, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -104.014999, -31.623831, -118.950104, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -155.565796, -38.010250, -31.357361, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shelfclawSahagin_766' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -75.944153, -27.532305, -144.487701, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -101.024223, -30.306547, -149.355865, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -190.973221, -36.762527, -111.709793, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -119.365509, -31.385445, -102.356194, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -85.840622, -29.611879, -107.485497, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -157.610504, -38.071289, -31.235229, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -175.234207, -38.051666, -76.633934, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -132.165466, -30.458733, -8.729252, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shelfspineSahagin_767' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -94.161926, -30.635151, -89.379402, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -48.966251, -22.665247, -124.681503, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -106.523300, -31.509951, -130.479904, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -166.765900, -32.578060, 5.874695, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -215.871918, -40.822292, -67.836021, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -89.256203, -30.084669, -124.693199, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -115.534233, -26.784563, 18.541813, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -150.201096, -32.487724, -113.122444, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Sapsaelbst_2832' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -274.764923, -40.703537, -336.407104, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -277.360535, -41.199173, -352.245148, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -257.346191, -41.214268, -330.312500, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -218.294724, -40.989071, -291.742096, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -181.207321, -41.844490, -270.081940, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -196.028442, -41.727314, -288.479828, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'freshwhelkballista_2836' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -294.392303, -41.489319, -349.569000, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -283.527893, -41.916561, -357.747803, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -296.894806, -41.733459, -359.090607, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -293.720886, -41.641911, -367.788208, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -282.062988, -42.038639, -367.910309, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shoalscaleSahagin_765' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -223.208710, -41.764877, -196.344330, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -168.981369, -40.908073, -290.732086, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shoalclawSahagin_766' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -146.990204, -41.031559, -289.265289, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -212.413269, -41.816219, -228.919693, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shoalspineSahagin_767' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -237.445602, -41.977600, -231.189499, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -243.732407, -41.032051, -179.705597, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -237.476196, -42.008121, -307.362488, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -197.619598, -41.428280, -317.036713, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -202.472000, -42.008121, -244.739395, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shoaltoothSahagin_768' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -147.081696, -41.031559, -291.035309, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -240.826675, -41.672653, -219.247238, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -184.340927, -40.254555, -214.701431, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -203.427094, -41.483276, -281.547546, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -139.955750, -40.404739, -240.812851, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -265.469360, -42.719551, -266.499634, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Sapsashelfclaw_766' ) , 47, 2464 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -281.116913, -42.008121, -359.151611, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -282.307190, -42.008121, -365.072113, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Sapsashelfspine_767' ) , 47, 2464 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -293.720886, -41.580872, -346.913910, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -292.652802, -41.672421, -327.657013, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -292.652802, -41.733459, -365.011108, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Sapsashelftooth_768' ) , 47, 2464 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -228.354919, -39.483036, -345.774384, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -294.453400, -41.580872, -359.822998, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'axolotl_139' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -390.927277, -34.285240, -295.150085, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -365.479279, -36.514393, -288.353485, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -371.290802, -37.204941, -296.766418, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -355.628601, -37.750099, -302.916290, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'reinforcedwhelkballista_2837' ) , 48, 5138 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -423.105713, -33.005535, -367.492004, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -415.392700, -33.236031, -358.443909, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -425.528412, -33.066349, -357.686798, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -395.040802, -38.559631, -343.953613, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -377.859192, -39.444641, -348.989105, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'seawasp_312' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -373.559967, -39.256435, -203.779465, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -372.283478, -39.316368, -202.468887, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -393.575012, -41.767242, -203.534607, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -360.035217, -38.911335, -222.539642, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -354.089874, -39.660213, -201.978973, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -355.678864, -37.158779, -241.068436, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -350.930023, -37.643482, -237.743713, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'trenchtoothSahagin_768' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -78.263550, -26.108219, -70.908691, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -73.338928, -25.642410, -74.728661, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -73.901482, -25.768646, -86.375961, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shelfscaleReaver_773' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -441.402222, -40.701698, -233.601974, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shelfclawReaver_774' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -441.245209, -39.475101, -220.111496, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'shelfeyeReaver_776' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -441.435974, -38.926212, -213.282013, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Sapsashelfscale_765' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -422.721344, -33.686390, -326.296539, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -415.514801, -33.350899, -355.147888, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -344.364044, -39.466038, -361.109711, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Sapsashelfclaw_766' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -425.589386, -33.107040, -354.529510, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -361.484436, -35.257927, -411.014862, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -352.739044, -38.351639, -377.168549, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -319.625488, -39.391800, -300.050995, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Sapsashelfspine_767' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -440.940002, -32.821819, -363.149506, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -425.913300, -32.916882, -368.407501, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -458.416687, -32.786930, -362.740295, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -397.546295, -37.902161, -342.084900, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 138, ( SELECT id FROM bnpctemplate WHERE name = 'Sapsashelftooth_768' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -350.843597, -35.153549, -405.412476, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -370.744995, -35.287498, -414.281708, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -375.469208, -39.479321, -346.811401, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -317.930511, -39.354549, -298.395599, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'wildwolf_303' ) , 20, 445 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -381.951752, -1.865713, 212.042023, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -371.391357, -0.687764, 196.625290, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -429.788086, -4.146658, 249.937302, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -424.664642, -4.389118, 254.018524, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -462.297302, -7.249224, 236.271515, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -398.920288, -2.606930, 180.822937, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -448.650696, -11.947705, 209.230209, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -402.708191, -3.109433, 174.303268, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'bumblebeetle_36' ) , 20, 445 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -422.501465, -7.614745, 201.604248, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -388.824432, -2.578248, 177.678131, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -354.077728, 0.536767, 174.858154, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -465.114685, -3.054204, 249.472595, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -467.935242, -2.167278, 250.799210, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -439.207886, -7.911947, 241.229767, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'bumblebeetle_36' ) , 21, 483 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -429.281189, -1.188653, 102.061584, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -435.544128, -0.955348, 123.893471, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -437.993896, -1.031299, 126.314613, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -414.902252, -2.773921, 160.474014, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'stoneshell_382' ) , 21, 483 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -422.713104, -2.312514, 137.219559, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -373.282501, -2.801552, 149.988815, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -371.671844, -2.430629, 156.019821, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -396.004242, -2.555122, 148.152954, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -383.427673, -2.876643, 160.658722, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -403.971313, -2.240242, 157.015625, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -405.759705, -2.889138, 139.678970, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -391.970581, -2.744184, 146.105545, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -380.797363, -2.897662, 146.567444, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'forestyarzon_159' ) , 22, 520 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -414.757141, -3.022781, 28.021654, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -405.892303, -2.628568, 43.051041, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -515.360107, -3.022781, -9.979798, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -522.299805, -3.022781, -10.434307, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -483.240540, -3.022781, -1.752226, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -426.197021, -2.781258, 25.197863, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -432.669647, -2.654341, 20.002827, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'bumblebeetle_36' ) , 22, 520 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -432.868530, -2.043492, 62.119469, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -475.415741, -2.053370, 23.742413, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'coeurlpup_28' ) , 23, 558 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -592.409119, -0.896684, 0.386436, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -564.974304, -0.983113, -13.998669, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -591.289734, -2.385894, -32.616730, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -626.554626, -2.556157, -3.032897, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -644.733398, -2.579175, 5.788857, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -592.026917, -0.139966, 8.961593, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'bumblebeetle_36' ) , 23, 558 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -589.191589, -1.701380, -16.803839, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -581.001099, -1.248399, -12.149311, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -555.803711, -1.936794, -2.565444, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'koboldfootman_328' ) , 24, 595 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -377.173157, 38.711910, 29.792322, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -404.069885, 35.812199, 36.532841, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -489.859711, -2.618297, 38.082218, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -396.071106, 43.296131, -2.805411, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -439.528412, 32.168262, 55.036327, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -468.465546, 36.479664, 26.908142, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -484.342163, -1.634364, 24.240206, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'koboldpickman_329' ) , 24, 595 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -491.041992, -2.412468, 34.461601, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -428.479553, 38.496067, 14.828461, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -402.817291, 36.296867, 33.293110, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -391.328400, 44.270889, -5.423687, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -476.028992, 29.465151, 52.901867, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -477.677368, 27.532982, 57.619347, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -480.850861, -1.622468, 35.452560, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'bumblebeetle_36' ) , 24, 595 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -380.239441, 40.455021, 15.811886, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -467.829315, 31.729000, 45.958958, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -427.287354, 35.776600, 40.411327, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'mudpugil_383' ) , 30, 821 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 561.284851, -1.738799, 205.528839, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 623.663635, -2.932235, 132.726913, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 640.196655, -3.022781, 174.134933, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 645.843750, -2.975219, 170.168198, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 638.579102, -2.995459, 186.706192, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 584.620300, -2.303465, 169.148834, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 593.450562, -2.844428, 139.766556, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 574.049438, -2.987645, 137.301453, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 580.756775, -2.611646, 131.970093, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 30, 821 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 664.319397, -2.598749, 162.226898, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 542.460022, -2.149217, 151.568039, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 541.605957, -3.010482, 157.341522, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 601.389954, -2.892532, 128.130249, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 617.788452, -2.952927, 183.668243, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'MamoolJabreeder_343' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 661.936829, -1.528112, 134.098465, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 595.966858, -1.835564, 221.160812, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'MamoolJaexecutioner_344' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 695.272278, 0.237290, 145.195099, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 570.693848, -1.735677, 191.361359, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'MamoolJainfiltrator_345' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 685.403076, -0.007515, 122.931915, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 593.693115, -2.607079, 207.171448, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'MamoolJasophist_346' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 619.854187, -3.022781, 198.036560, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 705.063721, -0.073885, 131.977234, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'uragnite_389' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 450.240051, -2.881454, 177.001404, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 397.457977, -2.500741, 180.186234, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 437.507446, -2.849627, 192.575226, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 439.095184, -2.668610, 187.743286, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 363.489441, -2.988054, 127.097084, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 387.101715, -2.852393, 141.769638, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 394.360138, -2.946918, 141.727402, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 415.567535, -3.022781, 152.113510, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 358.055237, -2.438254, 31.307247, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 373.647980, -2.204629, 21.426832, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 376.822510, -2.764290, 20.605335, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 361.111664, -2.359983, 141.265671, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 365.486603, -2.883696, 54.215927, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 386.960846, -2.544994, 180.465637, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'MamoolJabreeder_343' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 321.662354, -1.706533, 0.576895, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 299.033508, -2.221566, 89.648232, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 339.212128, -0.687913, 207.471146, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'MamoolJaexecutioner_344' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 321.650604, -2.761652, 82.931305, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 381.731079, 2.535215, -15.226002, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 344.894470, -0.917974, 206.625656, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'MamoolJainfiltrator_345' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 358.525208, 2.440526, -4.988740, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 359.317413, -0.445646, 214.080124, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 338.428162, -2.649891, 100.926704, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'MamoolJasophist_346' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 351.069305, 0.455040, 2.362295, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 298.613068, -2.510823, 96.570503, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 352.498535, -2.229944, 192.390152, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 274.326050, -3.022781, 220.717575, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 247.186829, -3.022781, 246.639771, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 275.964752, -3.022781, 218.849091, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'salamander_139' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 330.537537, -2.184135, 153.375824, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 305.825378, -3.022781, 146.717667, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 296.616180, -3.013719, 160.163116, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 276.898376, -3.022781, 81.090591, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 286.759888, -3.022781, 38.590855, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 293.494293, -3.022781, 38.362095, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 325.467896, -2.961442, 28.651447, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'koboldpatrolman_328' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 287.232941, 22.459917, -94.937210, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 339.338654, 28.810354, -152.997025, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 369.648438, 23.634579, -124.963051, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'koboldpitman_329' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 334.573517, 13.179729, -64.033875, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 365.261505, 24.531950, -141.892105, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 262.362488, 26.421909, -92.842506, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'koboldsidesman_330' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 374.994720, 25.746836, -131.705902, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 261.838196, 34.373199, -145.137985, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 259.484711, 26.393141, -94.860497, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 139, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 314.082611, -2.220537, 16.427921, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 304.273346, -3.022781, 127.453300, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 250.051987, -2.988935, 83.435684, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 243.946030, -2.814081, 36.932377, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 327.924103, -2.738626, 94.117409, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 248.596893, -3.008550, 85.275566, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = 'earthsprite_131' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 154.950455, 25.137733, 220.499100, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -98.540382, 85.807083, -350.417999, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -150.565582, 82.029961, -330.553619, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -187.955566, 82.418648, -242.364868, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -68.849266, 77.210121, -228.975296, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -32.679142, 78.788490, -197.195984, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -50.138035, 76.590508, -179.011887, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -138.190628, 74.867424, -197.155426, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -115.129318, 69.254097, -164.934433, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 122.724625, 28.303354, 58.724297, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 160.029358, 37.028255, -21.424707, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 155.821182, 37.507317, -27.008282, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -261.132935, 64.443398, -90.575928, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -167.294601, 66.193542, -115.411652, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 17.072603, 12.420581, 249.430618, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 9.859401, 26.299496, 161.978531, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -201.519424, 76.680183, -189.318375, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -45.378353, 4.594343, 327.925201, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 29.113718, 9.739895, 301.944397, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -264.697968, 84.737694, -278.522827, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 88.354134, 17.421412, 203.354218, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 8.481019, 31.876749, 95.327995, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 102.454002, 21.556597, 133.843796, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -267.482941, 83.303230, -182.044739, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = 'basilisk_173' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -2.600920, 24.342901, 176.407578, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -26.477421, 23.268620, 166.940125, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 104.336456, 29.613770, 53.853245, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 28.270794, 31.794752, 85.501617, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 86.731804, 27.457956, 86.951363, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 153.025681, 26.303059, 60.375832, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 81.607170, 19.393501, 136.708725, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 36.706234, 12.549705, 269.077087, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 52.741432, 17.201839, 269.658844, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -21.052513, 9.488839, 260.401764, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = 'ahriman_183' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 141.796097, 37.025734, 1.178478, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 122.859512, 37.629654, 2.002243, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 127.627159, 33.635292, 21.377235, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = 'quartzdoblyn_188' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 70.859192, 17.383774, 184.972321, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 109.422623, 18.933929, 252.523972, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 115.614525, 21.238791, 254.591293, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 113.948357, 22.440674, 195.022736, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 93.687889, 16.169958, 214.933899, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 101.220345, 16.107920, 239.544205, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 86.353172, 16.866383, 248.478348, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = 'magitekvanguard_200' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -282.913391, 85.775131, -336.263336, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -275.471313, 86.578674, -250.622040, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -272.031189, 86.589439, -210.045593, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -208.797012, 82.544693, -315.692413, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -248.703522, 84.883377, -294.410217, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -201.729172, 73.905502, -152.126556, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -215.444275, 79.656067, -224.448868, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -210.075104, 80.036079, -227.536377, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = 'grenade_327' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 180.136047, 25.071756, 107.612526, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = '3rdCohorthoplomachus_55' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -91.872368, 75.002228, -228.461075, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -232.630829, 81.257980, -181.372650, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = '3rdCohortlaquearius_61' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -150.689713, 79.861855, -285.206177, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -240.244980, 83.404892, -326.932861, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -214.613144, 85.306969, -271.404236, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = '3rdCohorteques_62' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -145.073380, 76.635963, -224.310577, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -205.944687, 77.407257, -185.684372, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -177.328827, 74.465652, -181.077026, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = '3rdCohortsecutor_63' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -134.915619, 79.662804, -321.463623, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -184.025040, 83.300125, -278.188354, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -224.933304, 84.489143, -253.589706, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 147, ( SELECT id FROM bnpctemplate WHERE name = '3rdCohortsignifer_64' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -146.623947, 79.470093, -288.801514, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -226.367599, 84.477493, -253.589706, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -122.910088, 77.754440, -253.873520, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -229.763550, 81.019020, -190.646881, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -182.051605, 83.428810, -347.554321, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -175.474274, 75.299904, -194.970032, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'windsprite_133' ) , 22, 520 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 21.578611, 4.975241, 26.377096, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'kedtrap_23' ) , 22, 520 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 17.868296, 7.106042, -17.171526, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 29.205910, 5.484024, 47.603928, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'riveryarzon_159' ) , 25, 633 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 139.399139, 6.263747, 26.419214, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 152.402847, 5.237850, 17.936674, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 151.709412, 5.807860, 10.336679, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 109.642181, 5.755404, 51.438736, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 98.720840, 4.971702, 52.386410, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 45.767986, 4.761376, 66.993118, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 37.680748, 4.953293, 72.245308, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 65.079338, 5.674155, 66.390022, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'antelopestag_4' ) , 25, 633 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 104.758194, 8.080178, -56.307663, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 109.938576, 14.116609, -81.036194, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 100.920952, 7.607679, -55.427074, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 25, 633 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 126.284698, 4.644264, 45.026176, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 47.348400, 5.031322, 66.236412, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'antelopestag_4' ) , 26, 671 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 253.061035, 12.450743, -152.553329, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 250.477966, 10.586761, -169.728119, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 248.365814, 9.617976, -178.429169, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 281.224182, 9.269560, -169.353790, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 296.623962, 11.894608, -161.868713, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 295.196777, 10.541725, -183.692078, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 238.942795, 18.960083, -144.317749, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 292.637482, 10.876761, -164.807648, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'Redbellylookout_84' ) , 26, 671 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 73.622810, 7.818439, -111.865150, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'Redbellylarcener_86' ) , 26, 671 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 75.660446, 7.607049, -108.592979, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 74.906487, 7.766785, -112.382797, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'Redbellysharpeye_87' ) , 26, 671 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 84.243660, 8.847745, -90.705162, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 69.137863, 8.508118, -105.323936, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 68.866234, 7.953293, -107.132462, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 27, 708 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 157.845596, 16.789454, -140.097214, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 167.626282, 17.473413, -145.147446, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'Redbellylookout_84' ) , 27, 708 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 135.518982, 19.229555, -146.295181, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 170.907196, 17.193430, -151.395401, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 124.376198, 19.198467, -146.837601, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 126.090240, 20.705063, -111.209366, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 123.185997, 20.035912, -97.032173, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 71.000183, 19.030325, -159.014297, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'Redbellylarcener_86' ) , 27, 708 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 180.188995, 19.796492, -142.951370, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 124.414299, 19.054943, -145.398300, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 71.760773, 18.225830, -160.113007, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 121.843201, 20.218161, -96.971130, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'Redbellysharpeye_87' ) , 27, 708 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 171.717804, 17.307770, -150.139297, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 102.838219, 20.272621, -160.238190, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'antelopestag_4' ) , 28, 746 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 278.901642, 3.911347, 46.565025, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 324.412292, 5.306582, -42.944809, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 342.498230, 8.256850, -41.135147, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 272.340118, 3.846904, 13.428856, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 264.393372, 2.637880, 23.084396, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'goblinthug_52' ) , 28, 746 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 320.515686, 2.215992, -18.509239, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 331.883972, 2.904445, -16.655821, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 318.658691, 2.299638, -15.389510, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 317.199188, 0.290855, 13.417520, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 303.366119, 2.005001, -17.149740, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 320.698792, 2.227228, -15.091220, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 313.945190, 0.195134, 8.234367, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 318.018890, 0.478852, 12.307590, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 292.225494, 0.411926, 13.809330, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'watersprite_59' ) , 28, 746 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 311.033295, 0.517801, -0.204813, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 306.959686, 0.228231, 2.388638, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 300.585052, 0.253785, -0.255648, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'Coeurlclawcutter_311' ) , 29, 783 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 444.521759, 1.297850, -25.194082, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 435.940704, -0.982693, 5.487583, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 435.723999, -1.106398, 3.907724, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 399.968506, 4.714575, -41.852612, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 362.637268, 1.761672, 9.493670, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 356.912415, 2.690911, -10.183659, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 387.075500, -1.022401, 21.408360, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'Coeurlclawpoacher_79' ) , 29, 783 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 444.405365, 2.269864, -31.143581, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 436.545288, -1.022401, 4.501364, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 356.771088, 2.792354, 1.937849, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 400.476288, 4.241707, -40.787842, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 376.814392, 4.773165, -33.204460, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'Coeurlclawhunter_81' ) , 29, 783 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 438.216705, 0.502468, -19.721241, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 392.419891, 5.388818, -31.738232, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 404.366333, -0.462935, 16.939405, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 387.472290, -0.900329, 20.340231, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 356.160797, 2.597828, 2.700800, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'midlandcondor_13' ) , 30, 821 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -281.824707, 1.375012, 337.180084, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -120.189743, 1.298543, 297.432922, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -118.129181, 1.586027, 290.873566, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -180.149811, 1.329228, 259.241241, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -174.450653, 0.826647, 326.032074, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -233.590225, 0.609150, 303.478058, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'hoverflyswarm_41' ) , 30, 821 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -208.225418, 1.091709, 321.095123, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -189.756714, 0.523384, 276.984833, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -154.484329, 0.228401, 290.810242, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -282.577454, 1.781374, 344.390350, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -243.982834, 0.294519, 312.494995, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'bigmouthorobon_302' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -136.303848, 0.235673, 470.061859, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -135.688385, 0.209063, 466.644989, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -186.763107, 0.368787, 478.433899, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -172.772980, 0.564238, 437.816650, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -163.358063, 0.632972, 460.179504, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -191.338089, 0.343685, 474.522247, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -180.257813, 0.435515, 480.663116, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -173.713257, 0.153294, 446.080353, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'adamantoise_34' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -307.343994, 1.574708, 411.567749, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -252.784439, 0.284077, 461.137482, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -296.081299, 0.939354, 467.506958, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -316.329285, 0.085494, 443.564148, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -205.251495, 1.132652, 434.677643, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -284.932007, 0.811789, 409.177917, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'hoverflyswarm_41' ) , 31, 912 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -293.701935, 0.574562, 415.584351, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -239.102600, 1.174322, 487.598419, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -272.729065, 0.371793, 454.892212, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -301.002502, 0.971183, 477.373108, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -223.200058, 0.360053, 432.863922, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'revenant_305' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -361.600006, 1.953293, 461.799988, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -358.479858, 1.895434, 458.000153, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -341.376892, -0.246708, 431.042175, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -334.172821, -0.142858, 441.960754, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -362.200012, 2.353294, 450.799988, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -334.659546, 0.086901, 455.306061, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -337.223297, 0.167704, 454.781830, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -345.804718, 0.536044, 449.956573, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'adamantoise_34' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -73.595444, 0.654059, 440.756439, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -100.552437, 0.556002, 337.963379, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -81.910637, 0.399478, 426.748169, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -108.549438, 0.759574, 446.906830, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -127.783997, 0.153294, 343.045929, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -124.156303, 0.622273, 390.338318, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'hoverflyswarm_41' ) , 33, 1094 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -123.271049, 0.153294, 336.635468, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -102.907066, 1.110574, 385.834503, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -97.304504, 0.220831, 460.319794, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -160.513351, 0.254719, 441.550232, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -104.048363, 1.260202, 382.858948, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -73.559479, 0.927049, 383.122620, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'stroper_304' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -18.452950, 0.207803, 361.804718, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -12.646904, 0.492321, 373.455322, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -15.496044, 0.153294, 322.616821, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -60.369980, 0.620001, 331.898956, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -44.584179, 0.468473, 399.977570, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -79.705612, 1.004676, 377.104370, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -0.331188, 0.153294, 341.051147, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -52.701607, 0.650173, 324.390594, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'hoverflyswarm_41' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -24.597773, 0.336645, 382.682190, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -28.498209, 0.238283, 382.024170, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -38.815331, 0.878316, 326.413666, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -17.169430, 1.614668, 343.095428, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -67.169716, 0.450503, 346.946411, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'lesserkalong_130' ) , 35, 1277 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 218.278320, 9.626074, 42.293156, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 201.231918, 13.938748, 18.245020, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 208.655640, 12.012166, 40.583130, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'deepvoiddeathmouse_143' ) , 35, 1277 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 243.538208, 6.369292, 43.698978, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 220.841019, 9.326168, 42.316071, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 215.659210, 9.621600, 21.393459, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 219.666031, 7.852551, 27.424515, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 205.594772, 11.920905, 12.274120, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 193.294479, 14.422457, 15.546280, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 179.509689, 13.172311, 15.140548, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 180.165024, 15.262697, 20.420422, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'lesserkalong_130' ) , 36, 1368 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 109.671593, 18.664917, 103.629242, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 122.636292, 19.212322, 85.012367, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 118.593910, 19.753290, 81.778809, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 166.242508, 17.621466, 71.034737, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 190.215240, 16.190983, 24.241163, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 194.059692, 15.553300, 58.400002, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 193.453125, 15.622672, 59.301884, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'treant_24' ) , 36, 1368 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 148.602325, 17.591097, 64.458740, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 110.585899, 19.560278, 116.602638, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 64.674263, 26.419935, 135.548584, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'lesserkalong_130' ) , 37, 1459 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 69.238647, 23.642693, 202.599472, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 51.212658, 20.345995, 218.766418, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 49.663757, 12.027298, 281.284607, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 51.175465, 11.474810, 285.991211, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 53.829185, 25.959589, 143.245911, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 54.810070, 26.042759, 138.357468, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'deepvoiddeathmouse_143' ) , 37, 1459 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 45.381493, 23.541809, 246.465607, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 53.844872, 10.819162, 285.051788, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 30.966400, 5.725693, 299.167664, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 78.123070, 22.513016, 213.663788, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 88.113548, 23.136980, 172.128036, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 64.183640, 22.950760, 172.328491, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'lesserkalong_130' ) , 38, 1550 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 50.987141, 26.500879, 130.803696, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 35.066334, 25.258486, 122.712532, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'treant_24' ) , 38, 1550 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 63.075527, 18.440212, 254.309052, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 45.862797, 26.633394, 135.292236, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'will-o-the-wisp_45' ) , 38, 1550 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 79.220726, 24.047203, 202.930588, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 75.620148, 23.101341, 173.372421, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 87.131577, 22.574894, 147.871826, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 85.647774, 24.132235, 202.558289, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 134.761444, 28.608131, 167.188324, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 129.156998, 25.553301, 181.000000, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 130.522385, 28.263964, 163.548691, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 147.503143, 32.914188, 178.984558, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'lesserkalong_130' ) , 39, 1641 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 35.917995, 20.827244, 200.469391, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 19.165949, 21.876945, 190.043381, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 11.875324, 23.129019, 189.192474, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'treant_24' ) , 39, 1641 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 44.467606, 20.028774, 208.815323, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 29.018549, 21.832933, 191.113770, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'lesserkalong_130' ) , 45, 2255 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 458.028564, 1.207998, 166.398666, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 457.177734, 0.977621, 169.305634, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 382.045959, -3.000765, 87.875648, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 380.607117, -1.714232, 96.928268, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 364.208771, -3.970027, 67.266266, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 366.628906, -4.532925, 65.597023, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 379.016663, -3.561828, 81.993332, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 413.104309, 4.103601, 130.404922, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 413.245178, 3.991643, 157.491852, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'wildhog_16' ) , 45, 2255 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 441.558441, 1.072546, 192.598175, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 458.455750, 4.506071, 200.943817, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 451.870850, 2.925568, 198.553757, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 397.338837, 0.778188, 117.291611, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 361.043579, 2.042016, 137.151703, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 416.318726, 3.714472, 154.953125, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 393.102020, 4.861976, 164.145691, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 473.094635, 0.853687, 151.026642, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 495.067139, 3.394598, 169.433228, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 372.369049, -0.252312, 145.539474, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'lesserkalong_130' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 507.013977, 5.353294, 208.204666, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 498.367493, 7.215365, 187.338974, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 545.736084, 11.106025, 197.726318, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 556.766907, 22.091091, 102.551453, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 501.207977, 5.114982, 172.674042, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'wildhog_16' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 483.206665, 5.295686, 204.618622, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 531.545410, 9.615707, 194.108994, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 545.011475, 10.566165, 202.816986, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 552.279114, 10.250693, 218.189026, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 509.520203, 5.797393, 203.292374, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'lesserkalong_130' ) , 47, 2464 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 565.008789, 22.103556, 119.079933, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 523.467896, 17.700638, 110.807457, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 537.433899, 15.900310, 149.338684, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 521.968994, 18.131744, 102.781433, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 153, ( SELECT id FROM bnpctemplate WHERE name = 'ked_8' ) , 47, 2464 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 559.085510, 22.032907, 130.158432, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 557.397766, 22.323153, 98.222397, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 540.623718, 22.001871, 120.312935, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 538.782227, 13.122617, 164.472412, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 510.703217, 14.727483, 136.516693, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 506.451019, 15.708985, 115.746490, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -328.214935, -1.382104, -562.018494, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -388.065887, -6.709208, -538.175354, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -203.945206, 7.083276, -662.385864, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -379.218628, -13.288798, -504.089905, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -50.662155, 17.365246, -621.277710, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -90.671295, 0.858022, -621.603394, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -157.870773, -1.739383, -601.380615, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -306.650543, -15.724052, -485.586731, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'mudpuppy_139' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -466.278961, -9.345193, -536.730896, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -415.876953, -0.624770, -563.817444, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -353.362549, -6.366338, -521.945862, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -353.668152, -1.889767, -554.169678, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -358.576813, -4.208381, -544.994019, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -393.795471, -14.137053, -498.157990, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -419.072571, -6.750120, -525.624817, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -364.357361, -16.055626, -485.979156, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'morbol_140' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -400.447693, -16.800800, -359.738800, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -430.408478, -16.474775, -380.616394, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -305.019958, -16.239365, -455.824524, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -382.151276, -16.695229, -437.809906, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -340.258087, -16.800798, -435.010925, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -368.801117, -16.799139, -384.071411, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -399.663300, -15.824222, -469.566040, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -392.769775, -16.800800, -355.330872, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'nix_27' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -270.115723, -5.564771, -530.555054, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -279.074890, -9.268876, -515.046387, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -296.879089, -3.662974, -551.692932, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -106.126770, -0.551605, -641.217102, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -100.280334, 2.170384, -585.664856, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -168.402740, 6.150620, -671.770264, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -205.364151, -2.393888, -579.431946, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -207.987137, 2.095308, -618.217896, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 45, 2255 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 155.234894, 14.862438, -595.883179, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 221.954544, 20.428785, -614.556824, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 204.700058, 0.592923, -555.540466, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'lakecobra_777' ) , 45, 2255 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 179.281021, -22.899044, -448.000000, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 303.274078, -25.327501, -425.410950, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 308.878082, -26.339148, -406.439697, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 268.547302, -22.023846, -404.229553, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 214.777313, -22.923229, -424.896454, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 206.022980, -23.576593, -420.736481, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 148.975128, -26.967882, -439.738098, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 161.692841, -27.403070, -429.507172, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 294.337982, 15.031981, -649.709106, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 316.565247, 26.081779, -728.244263, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 380.336121, -3.791148, -690.031677, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 337.717163, 4.031579, -690.909851, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 560.117798, -6.999856, -657.073792, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 573.328003, -1.667467, -623.888733, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 341.486481, -7.720042, -454.207611, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = '5thCohorthoplomachus_55' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -556.903625, -2.485354, -455.298401, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -429.370392, -13.977342, -423.385071, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -449.289978, -10.910893, -468.692657, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -475.984589, -4.141672, -466.825958, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -465.682953, -3.579284, -251.795898, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -532.359619, -2.044634, -291.235474, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = '5thCohortlaquearius_61' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -468.484222, -4.199565, -501.470306, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -468.636261, -4.000793, -276.630219, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -542.703735, -3.200111, -329.053131, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -475.353668, -3.883567, -478.330811, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -640.300476, -3.558564, -367.160309, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = '5thCohorteques_62' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -592.797729, -2.945007, -432.211792, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -446.294891, -3.984699, -219.651199, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -431.483154, -1.764804, -303.251862, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -635.341492, -2.933044, -396.278687, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -546.838928, -1.655508, -293.503632, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -557.301758, -3.677437, -381.385284, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -558.028809, -3.625569, -364.324585, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -489.250092, -3.627208, -282.124115, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -482.683105, -5.597062, -441.493073, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -479.714355, -4.413937, -417.199463, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -437.867004, -2.581742, -273.708099, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = '5thCohortsecutor_63' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -566.502625, -2.782105, -424.495209, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -429.060333, -3.250240, -244.869003, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -563.040833, -2.800797, -326.335052, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -470.802673, -6.755476, -449.609680, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = '5thCohortsignifer_64' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -600.921204, -3.536839, -364.490417, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -489.175293, -3.463209, -246.931213, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -450.320038, -10.954619, -443.615082, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -527.848938, -3.884468, -328.329559, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'hippogryph_645' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 288.388214, 35.697899, -691.959290, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 297.593445, 22.060387, -684.986938, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 347.112274, 21.745182, -725.411682, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 357.257690, 21.586653, -742.933533, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 370.948944, 22.898510, -736.725281, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 360.181458, -0.605726, -693.488159, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 562.813049, -3.384825, -641.108826, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 265.096130, 31.913975, -655.052612, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 271.069336, 32.070313, -656.951233, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'gigasshramana_727' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 306.364746, -5.760643, -519.664429, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 365.097046, -13.677204, -430.790649, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'gigasbonze_728' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 282.880981, -0.431493, -568.846741, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 355.587311, -4.908767, -464.247131, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'gigassozu_729' ) , 46, 2360 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 313.073486, 6.867375, -558.511169, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 357.963623, -24.465349, -377.861969, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = '5thCohortvanguard_201' ) , 47, 2464 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -582.038574, -3.258524, -375.911133, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -541.600830, -3.747990, -410.381073, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -551.768066, -1.774953, -306.972473, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -498.718903, -3.551362, -255.750671, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 485.397308, 5.016501, -833.477112, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 481.436981, 5.220707, -835.526794, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 471.936218, 3.177799, -816.784912, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 499.297638, -2.805530, -776.088135, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 416.334198, -8.178817, -750.712708, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 555.593201, -8.565275, -754.109070, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 482.898956, 2.257884, -809.709290, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 156, ( SELECT id FROM bnpctemplate WHERE name = 'hapalit_647' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 555.226746, -8.898793, -734.929565, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 453.029816, -4.964316, -753.367249, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 455.815704, -4.557326, -760.564636, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 473.033081, 1.239610, -802.416260, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 484.811157, -0.451689, -793.427063, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 483.354614, 2.609100, -811.419617, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 495.249084, -4.774260, -758.666748, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 10, 192 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -53.968075, 40.626629, 577.494324, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -54.772152, 40.937740, 569.377563, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -27.903179, 55.617722, 511.196289, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'wildjackal_138' ) , 10, 192 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -89.379288, 57.873600, 491.677826, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -80.299843, 60.484467, 498.957672, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -79.367607, 57.337360, 534.587830, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -81.123886, 55.629345, 540.495178, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -15.353406, 60.152943, 476.861328, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -72.753616, 61.324738, 494.654724, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -26.776743, 43.582298, 560.247437, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -50.769970, 40.481682, 588.929504, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -52.828140, 40.217793, 600.331543, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -49.674686, 40.202091, 599.041870, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -57.956455, 55.197498, 509.726349, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'wildjackal_138' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 82.880508, 50.351704, 638.699036, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 68.658043, 46.920773, 632.664490, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 45.426044, 37.137592, 655.502625, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 81.656174, 49.286789, 644.880005, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'Morabymole_205' ) , 12, 243 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -0.340401, 42.041264, 627.708862, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 2.056473, 42.693142, 626.235168, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -124.439224, 10.043127, 653.849670, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -128.738632, 8.098146, 662.301453, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -74.418259, 3.002367, 802.470886, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'megalocrab_326' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -175.758530, 0.192970, 740.565857, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -129.824707, 0.392452, 755.607910, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -126.430168, 0.436597, 759.001587, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -90.773346, 8.807611, 680.411194, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -73.412216, 2.084321, 760.770325, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -119.570595, 3.740158, 701.817200, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -81.683006, 3.098206, 798.504700, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -210.956909, 0.192970, 664.005737, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -222.488434, 0.192970, 683.450134, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -214.674591, 0.192970, 689.205322, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'Qiqirneggdigger_771' ) , 13, 268 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -144.570282, 4.538429, 667.944885, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -149.620605, 3.272589, 669.616089, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -161.990494, 1.669328, 666.421692, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -160.952896, 1.569027, 667.861206, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -147.976685, 7.211773, 648.754333, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -150.745529, 1.891097, 679.430908, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -140.959915, 1.381874, 717.960083, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -149.139404, 0.759766, 712.362000, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -148.567505, 0.750069, 714.199524, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'blackbat_1037' ) , 15, 905 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 263.554291, 46.455059, -196.807800, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 267.421997, 45.726028, -206.636902, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 302.008209, 47.155479, -168.970596, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 310.276093, 46.441952, -163.621597, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 329.482605, 44.452869, -210.422897, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 324.378510, 43.693790, -222.837906, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'caveaurelia_1038' ) , 15, 905 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 271.453613, 45.504711, -200.075607, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'foper_7439' ) , 60, 40160 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 9.523642, 53.720516, -217.046158, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 157, ( SELECT id FROM bnpctemplate WHERE name = 'spinner_7442' ) , 60, 40160 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 223.210526, 44.843811, -339.998749, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 30, 821 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -346.389740, 62.519150, -126.275093, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -353.836487, 61.672997, -119.187897, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'pteroc_65' ) , 30, 821 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -354.420074, 56.423233, -96.513840, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -344.395325, 64.607246, -157.902496, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -341.323090, 64.578575, -160.182724, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -350.233124, 61.524578, -113.885941, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -319.546082, 60.104488, -124.223816, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -317.671509, 53.908203, -95.338379, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -317.611389, 60.075729, -128.127838, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'coeurl_117' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -365.764526, 65.494736, -305.070099, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -292.933563, 70.880463, -266.741791, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -372.481171, 60.137611, -369.996338, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -372.656219, 61.014076, -350.488831, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'highlandcondor_13' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -303.275574, 61.479023, -149.118958, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -248.915100, 63.041786, -183.808167, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -252.249084, 63.570446, -185.770676, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -216.185196, 66.569382, -242.893326, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -300.852142, 63.176342, -178.160568, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -263.679626, 63.708836, -251.339615, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -229.079773, 64.834488, -245.728836, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -210.108521, 67.672935, -243.264084, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'lightningsprite_135' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -330.467377, 64.261154, -336.252960, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -393.794373, 49.725521, -341.202271, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -322.923187, 64.709900, -184.963135, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -316.858765, 64.213211, -314.357330, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -290.307983, 55.575882, -263.303406, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -380.062164, 53.973499, -291.843719, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -153.678604, 82.767532, -307.626709, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -170.819321, 78.937599, -266.836945, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -264.982056, 63.947887, -224.000000, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -351.385284, 54.183876, -241.304657, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'velociraptor_2' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 25.128429, 71.268677, -189.144226, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -5.871716, 68.419571, -210.217117, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -59.508007, 64.795944, -302.991058, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -126.917580, 81.681725, -323.143463, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -138.590454, 81.639252, -317.720551, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -161.965485, 79.463608, -261.348389, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -196.249908, 71.570564, -273.608765, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -47.980247, 63.111557, -275.292786, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -51.387047, 64.510307, -309.933960, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -123.665451, 78.886292, -293.496613, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'youngcoeurl_2269' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -268.777344, 64.469254, -321.818024, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -246.820190, 64.967072, -319.323730, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -300.127502, 68.867729, -297.000824, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'basaltgolem_30' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -379.582794, 49.599728, -320.617401, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -392.384827, 48.829506, -270.781586, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -289.848114, 54.379707, -289.998871, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -339.448914, 50.635178, -294.665192, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -404.812653, 46.717731, -310.487518, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -324.328186, 55.788815, -224.676117, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -351.290314, 51.576576, -265.921173, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'plasmoid_46' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 180.076050, 59.615356, -148.851715, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 183.105377, 60.757282, -155.007202, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 184.878326, 61.323547, -156.019150, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 191.771393, 61.550873, -163.132507, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 185.650284, 60.073540, -150.433075, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 188.958481, 58.811165, -143.723083, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 172.057220, 60.347488, -160.257004, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 190.024429, 61.667694, -162.565582, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'ringtail_6' ) , 34, 1185 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -337.538879, 22.261187, -512.543579, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -294.067444, 15.837619, -526.381409, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -284.631256, 15.979709, -524.325195, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -309.562897, 33.556576, -437.443756, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -327.216400, 33.860405, -452.127991, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -309.471985, 33.399452, -451.401154, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -296.423798, 32.770798, -443.928497, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -306.180389, 33.152576, -443.576508, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'grenade_327' ) , 41, 1837 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 49.782619, 48.558388, -359.919220, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 80.883301, 50.040894, -366.288025, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 61.501572, 48.824192, -386.915070, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 52.480934, 48.723763, -384.418518, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -3.816909, 49.996655, -342.930389, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -5.917726, 50.031612, -336.814178, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 16.670258, 49.568516, -332.820740, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 34.356415, 48.560959, -377.403534, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 3.316012, 48.751251, -308.807129, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 2.967811, 49.255138, -301.323792, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -0.587284, 49.616844, -347.270569, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -6.205463, 50.334320, -341.626526, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'koboldroundsman_755' ) , 41, 1837 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 77.880554, 57.709564, -304.362427, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 64.891975, 57.670910, -316.025116, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 74.143547, 48.569462, -406.118896, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 79.789307, 68.458755, -250.385300, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 23.727297, 49.034428, -362.581635, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -5.388740, 48.944725, -320.026978, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -2.076543, 49.155315, -324.895752, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'koboldquarryman_756' ) , 41, 1837 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 70.334991, 67.581085, -261.801605, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 71.335938, 48.508419, -408.346710, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 46.616211, 48.585762, -346.456085, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 16.776409, 48.642620, -366.713409, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -5.775769, 49.300411, -323.626160, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -3.524841, 48.325321, -324.818787, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -7.160486, 48.940979, -321.393829, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'koboldbedesman_757' ) , 41, 1837 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 66.550941, 48.806358, -363.489288, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 80.058411, 48.957294, -398.777863, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 61.175064, 66.270889, -239.485504, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 43.717041, 48.884872, -344.197815, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -19.895678, 48.686302, -303.251129, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'koboldpriest_758' ) , 41, 1837 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -23.801125, 53.776348, -341.428009, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 41.243237, 48.551842, -397.472931, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'bombincubator_2833' ) , 44, 4300 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 61.290409, 55.318249, -509.565887, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 50.868221, 55.176491, -509.842285, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 51.481640, 55.599010, -491.209015, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 47.109711, 56.992210, -500.873199, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'grenade_327' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 56.011013, 56.871895, -476.327240, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 56.081234, 55.888691, -500.382965, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 83.261269, 55.470901, -451.263214, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'koboldroundsman_755' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 73.660034, 57.014153, -507.752472, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 47.135010, 56.961788, -498.527496, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'koboldquarryman_756' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 61.299801, 55.422451, -506.939392, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 53.829788, 55.176491, -510.031586, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'koboldbedesman_757' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 78.337578, 55.921329, -458.039429, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 53.985661, 55.599010, -492.126312, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'koboldpriest_758' ) , 44, 2150 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 97.362740, 55.733959, -463.581757, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'syntheticdoblyn_189' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 19.672039, 24.659719, -611.021057, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 57.970928, 24.301811, -622.183655, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 84.582047, 24.139624, -710.028992, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 14.818369, 21.657869, -771.717468, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 19.921148, 26.625668, -802.449768, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'prototypebombincubator_2834' ) , 48, 5138 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 280.820007, 21.850000, -818.599976, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 282.380005, 22.062380, -807.590027, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 285.487915, 22.096889, -798.198914, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'UGhamaroroundsman_755' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 81.990967, 26.955635, -816.802246, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 117.540199, 24.338131, -605.890015, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 47.905769, 25.186752, -589.007019, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -11.884809, 25.236567, -663.126221, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 118.760902, 23.636169, -718.165894, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'UGhamaroquarryman_756' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 114.457634, 24.349905, -754.022217, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 44.950539, 24.971989, -675.010803, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 34.062794, 24.636602, -620.785767, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 74.762131, 25.395679, -678.056274, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 33.112991, 21.874960, -777.966125, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 86.037354, 24.478621, -699.376709, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'UGhamarobedesman_757' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 22.326897, 23.223667, -657.985352, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 83.358307, 40.804111, -574.260376, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 57.461895, 25.641956, -722.111023, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 27.246609, 21.618671, -784.161194, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'UGhamaropriest_758' ) , 48, 2569 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 117.893402, 23.059460, -785.317871, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 19.200001, 24.470900, -606.984863, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 30.990971, 22.995300, -758.266602, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 11.746227, 22.116056, -793.993530, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'syntheticdoblyn_189' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 207.624969, 24.173374, -679.869446, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 206.738022, 23.187981, -689.253052, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 203.890320, 24.761229, -742.728943, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 174.455490, 24.918858, -679.265625, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'UGhamarogolem_2838' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 279.971466, 23.543526, -732.147705, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 284.018738, 21.924915, -701.318176, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 307.891937, 24.247149, -729.314880, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 256.669067, 21.883627, -813.910156, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 245.038605, 25.634367, -840.968018, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'eliteroundsman_755' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 281.156311, 21.832199, -815.852112, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 177.686096, 23.920490, -654.072205, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 175.829697, 23.483580, -792.629883, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'elitequarryman_756' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 219.098969, 25.198187, -654.522827, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 148.700470, 25.171375, -757.199341, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 163.440704, 23.438585, -715.525391, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 283.243195, 22.311359, -796.170898, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'elitebedesman_757' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 279.447388, 21.881470, -807.844788, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 158.525894, 21.622009, -698.329224, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 177.663101, 23.430275, -782.703918, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 180, ( SELECT id FROM bnpctemplate WHERE name = 'elitepriest_758' ) , 49, 2673 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 254.038452, 21.881643, -798.051270, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 137.963898, 24.624701, -656.164612, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 155.508408, 21.852791, -697.356995, 0 ); INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) VALUES ( 250, ( SELECT id FROM bnpctemplate WHERE name = 'strikingdummy_8016' ) , 1, 10000 ); +SET @last_id_spawngroup = LAST_INSERT_ID(); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 96.160080, 2.359415, -4.634595, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 104.112198, 2.334595, -4.719133, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 95.987587, 2.359415, -24.583460, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 103.990997, 2.360248, -24.776320, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 5.759247, 25.616760, -51.532589, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, 3.004736, 25.616760, -51.484291, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -3.924433, 25.616760, -51.544392, 0 ); INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) VALUES ( @last_id_spawngroup, -5.181253, 25.616760, -41.729118, 0 ); diff --git a/bin/sql/schema/schema.sql b/bin/sql/schema/schema.sql index cdaa247e..902064cb 100644 --- a/bin/sql/schema/schema.sql +++ b/bin/sql/schema/schema.sql @@ -27,6 +27,17 @@ CREATE TABLE `bnpctemplate` ( KEY `templatename` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `spawnpoint` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `spawnGroupId` int(11) NOT NULL, + `x` float NOT NULL, + `y` float NOT NULL, + `z` float NOT NULL, + `r` float NOT NULL, + PRIMARY KEY (`id`), + KEY `spawngroupidx` (`spawnGroupId`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + CREATE TABLE `charainfo` ( `AccountId` int(11) NOT NULL, `CharacterId` int(20) NOT NULL, @@ -535,14 +546,12 @@ CREATE TABLE `houseiteminventory` ( INDEX `landIdent` (`LandIdent`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; - CREATE TABLE `spawngroup` ( `id` int(10) NOT NULL AUTO_INCREMENT, `territoryTypeId` int(5) NOT NULL, `bNpcTemplateId` int(10) NOT NULL, `level` int(3) NOT NULL, `maxHp` int(10) NOT NULL, - `gimmickId` int(10) NOT NULL, PRIMARY KEY(`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; diff --git a/src/tools/mob_parse/main.cpp b/src/tools/mob_parse/main.cpp index c6a6df07..07ce253a 100644 --- a/src/tools/mob_parse/main.cpp +++ b/src/tools/mob_parse/main.cpp @@ -250,7 +250,7 @@ int dumpSpawns() } - //std::ofstream out("output.txt"); + std::ofstream out("output_1.txt"); int spawngroups = 0; for( auto entry : zoneToPacketList ) @@ -285,6 +285,23 @@ int dumpSpawns() auto nameStruct = g_exdData.get< Sapphire::Data::BNpcName >( mobName.second.at(0).bNPCName ); Logger::info( "|--> " + nameStruct->singular + "(" + std::to_string( mobName.second.size() ) + ")" ); + Logger::info( "|-> " + std::to_string( entry.first ) ); + + std::string name1 = delChar( nameStruct->singular, ' ' ); + name1 = delChar( name1, '\'' ); + + std::string templateName = name1 + "_" + std::to_string( mobName.second.at(0).bNPCBase ); + + std::string output = "INSERT IGNORE INTO `spawngroup` ( `territoryTypeId`, `bNpcTemplateId`, `level`, `maxHp` ) " + " VALUES ( " + std::to_string( entry.first ) + + ", ( SELECT id FROM bnpctemplate WHERE name = '" + templateName + "' ) , " + + std::to_string( mobName.second.at(0).level ) + ", " + + std::to_string( mobName.second.at(0).hPMax ) + " );"; + + output += "\nSET @last_id_spawngroup = LAST_INSERT_ID(); "; + + + spawngroups++; for( FFXIVIpcNpcSpawn instance : mobName.second ) { @@ -298,7 +315,6 @@ int dumpSpawns() modelStr += "]"; - std::string cusStr = "["; for( auto cusEntry : instance.look ) @@ -315,7 +331,8 @@ int dumpSpawns() std::string name = delChar( nameStruct->singular, ' ' ); name = delChar( name, '\'' ); - Logger::info( "|----> " + name + "_" + std::to_string( instance.bNPCBase ) + " " + + Logger::info( "|----> " + name + "_" + + std::to_string( instance.bNPCBase ) + " " + std::to_string( instance.posX ) + ", " + std::to_string( instance.posY ) + ", " + std::to_string( instance.posZ ) + ", " + @@ -325,6 +342,14 @@ int dumpSpawns() std::to_string( instance.hPMax ) ); //Logger::info( "|----> " + name + " - " + std::to_string( instance.bNPCBase ) + ", " + std::to_string( instance.gimmickId ) ); + output += "INSERT INTO `spawnpoint` ( `spawngroupid`, `x`, `y`, `z`, `r` ) " + " VALUES ( @last_id_spawngroup, " + + std::to_string( instance.posX ) + ", " + + std::to_string( instance.posY ) + ", " + + std::to_string( instance.posZ ) + ", " + + std::to_string( 0 ) + " ); "; + + //Logger::info( output ); /*std::string output = "INSERT IGNORE INTO `bnpctemplate` ( `Name`, `bNPCBaseId`, `bNPCNameId`, `mainWeaponModel`, `secWeaponModel`, `aggressionMode`, `enemyType`, `pose`, `modelChara`, `displayFlags`, `Look`, `Models`) " @@ -343,10 +368,11 @@ int dumpSpawns() //Logger::info( output ); - //out << output; + } + out << output; } nameToPacketList.clear(); @@ -572,7 +598,8 @@ int dumpTemplates() int main() { - dumpTemplates(); + //dumpTemplates(); + dumpSpawns(); return 0; } \ No newline at end of file From 470b0c867f7a3440ad47361a8a588933831eee12 Mon Sep 17 00:00:00 2001 From: Dantestyle Date: Sun, 30 Dec 2018 19:06:21 +0100 Subject: [PATCH 72/86] [Quest] SubFst005 + SubFst045 added --- .../quest/subquest/gridania/SubFst005.cpp | 88 ++++++++++++++++++ .../quest/subquest/gridania/SubFst045.cpp | 90 +++++++++++++++++++ 2 files changed, 178 insertions(+) create mode 100644 src/scripts/quest/subquest/gridania/SubFst005.cpp create mode 100644 src/scripts/quest/subquest/gridania/SubFst045.cpp diff --git a/src/scripts/quest/subquest/gridania/SubFst005.cpp b/src/scripts/quest/subquest/gridania/SubFst005.cpp new file mode 100644 index 00000000..29fd7289 --- /dev/null +++ b/src/scripts/quest/subquest/gridania/SubFst005.cpp @@ -0,0 +1,88 @@ +#include +#include +#include +#include "Framework.h" + +using namespace Sapphire; + +// Quest Script: SubFst005_00028 +// Quest Name: To the Bannock +// Quest ID: 65564 +// Start NPC: 1000100 +// End NPC: 1000421 + +class SubFst005 : + public Sapphire::ScriptAPI::EventScript +{ +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; + + // Quest rewards + static constexpr auto RewardExpFactor = 200; + static constexpr auto RewardGil = 127; + + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000100; + static constexpr auto Actor1 = 1000421; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor1 = 1; + +public: + SubFst005() : + Sapphire::ScriptAPI::EventScript( 65564 ) + { + }; + + ~SubFst005() + { + }; + + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast( actorId ) ); + + if ( actor == Actor0 ) + { + Scene00000( player ); + } + else if ( actor == Actor1 ) + { + Scene00001( player ); + } + } + +private: + + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, 0, + [&]( Entity::Player& player, const Event::SceneResult& result ) + { + if ( result.param2 == 1 ) + player.updateQuest( getId(), SeqFinish ); + } ); + } + + void Scene00001(Entity::Player& player) + { + player.playScene( getId(), 1, 0, + [&]( Entity::Player& player, const Event::SceneResult& result ) + { + if ( result.param2 == 1 ) + { + if ( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + } ); + } +}; diff --git a/src/scripts/quest/subquest/gridania/SubFst045.cpp b/src/scripts/quest/subquest/gridania/SubFst045.cpp new file mode 100644 index 00000000..69d2ab59 --- /dev/null +++ b/src/scripts/quest/subquest/gridania/SubFst045.cpp @@ -0,0 +1,90 @@ +#include +#include +#include +#include "Framework.h" + +using namespace Sapphire; + +// Quest Script: SubFst045_00201 +// Quest Name: Passing Muster +// Quest ID: 65737 +// Start NPC: 1000421 +// End NPC: 1000421 + +class SubFst045 : + public Sapphire::ScriptAPI::EventScript +{ +private: + // Basic quest information + // Quest vars / flags used + // GetQuestUI8AL + + enum Sequence : + uint8_t + { + Seq0 = 0, + SeqFinish = 255, + }; + + // Quest rewards + static constexpr auto RewardExpFactor = 200; + static constexpr auto RewardGil = 128; + + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1000421; + static constexpr auto Seq0Actor0 = 0; + static constexpr auto Seq1Actor0 = 1; + +public: + SubFst045() : + Sapphire::ScriptAPI::EventScript( 65737 ) + { + }; + + ~SubFst045() + { + }; + + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto pEventMgr = m_framework->get< World::Manager::EventMgr >(); + auto actor = pEventMgr->mapEventActorToRealActor( static_cast( actorId ) ); + + if ( actor == Actor0 ) + { + if ( !player.hasQuest( getId() ) ) + { + Scene00000( player ); + } + else + { + Scene00001( player ); + } + } + } + +private: + + void Scene00000( Entity::Player& player ) + { + player.playScene( getId(), 0, 0, + [&]( Entity::Player& player, const Event::SceneResult& result ) + { + if ( result.param2 == 1 ) + player.updateQuest( getId(), SeqFinish ); + } ); + } + + void Scene00001(Entity::Player& player) + { + player.playScene( getId(), 1, 0, + [&]( Entity::Player& player, const Event::SceneResult& result ) + { + if ( result.param2 == 1 ) + { + if ( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + } ); + } +}; From 3b4d83429a6e188b93d052618ddfbda94dd02b2b Mon Sep 17 00:00:00 2001 From: Dantestyle Date: Sun, 30 Dec 2018 19:11:30 +0100 Subject: [PATCH 73/86] style --- src/scripts/quest/subquest/gridania/SubFst005.cpp | 2 +- src/scripts/quest/subquest/gridania/SubFst045.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/quest/subquest/gridania/SubFst005.cpp b/src/scripts/quest/subquest/gridania/SubFst005.cpp index 29fd7289..3466f924 100644 --- a/src/scripts/quest/subquest/gridania/SubFst005.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst005.cpp @@ -73,7 +73,7 @@ private: } ); } - void Scene00001(Entity::Player& player) + void Scene00001( Entity::Player& player ) { player.playScene( getId(), 1, 0, [&]( Entity::Player& player, const Event::SceneResult& result ) diff --git a/src/scripts/quest/subquest/gridania/SubFst045.cpp b/src/scripts/quest/subquest/gridania/SubFst045.cpp index 69d2ab59..b40ad24a 100644 --- a/src/scripts/quest/subquest/gridania/SubFst045.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst045.cpp @@ -75,7 +75,7 @@ private: } ); } - void Scene00001(Entity::Player& player) + void Scene00001( Entity::Player& player ) { player.playScene( getId(), 1, 0, [&]( Entity::Player& player, const Event::SceneResult& result ) From b7fcf6080cd4d1a9260ebce8ebaa40a069a0f4bd Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 31 Dec 2018 21:39:43 +1100 Subject: [PATCH 74/86] fix issue where items couldn't be removed from interior storeroom --- src/world/Manager/HousingMgr.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 8badd385..20dca94d 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -1386,24 +1386,24 @@ bool Sapphire::World::Manager::HousingMgr::removeInternalItem( Entity::Player& p { auto& containers = getEstateInventory( terri.getLandIdent() ); - // validate the container id first - // we also need the idx of the container so we can get the slot offset - bool foundContainer = false; uint8_t containerIdx = 0; - for( auto cId : m_internalPlacedItemContainers ) + + if( isPlacedItemsInventory( static_cast< Common::InventoryType >( containerId ) ) ) { - if( containerId == cId ) + for( auto cId : m_internalPlacedItemContainers ) { - foundContainer = true; + if( containerId == cId ) + break; - break; + containerIdx++; } - - containerIdx++; } + else + containerIdx = -1; - if( !foundContainer ) - return false; + // its possible to remove an item from any container in basically all these remove functions + // eg, remove a permit and reuse it elsewhere + // I'm not going to bother fixing it for now, but worth noting for future reference auto needle = containers.find( containerId ); if( needle == containers.end() ) @@ -1457,8 +1457,11 @@ bool Sapphire::World::Manager::HousingMgr::removeInternalItem( Entity::Player& p } // despawn - auto arraySlot = ( containerIdx * 50 ) + slotId; - terri.removeHousingObject( arraySlot ); + if( containerIdx != -1 ) + { + auto arraySlot = ( containerIdx * 50 ) + slotId; + terri.removeHousingObject( arraySlot ); + } return true; } From a04d01be90903323aac5b8e6ee4c0b1c605fe811 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 31 Dec 2018 21:54:32 +1100 Subject: [PATCH 75/86] some housing cleanup and refactoring --- src/common/Common.h | 10 +++++----- src/world/Manager/HousingMgr.cpp | 16 ++++++++-------- src/world/Manager/HousingMgr.h | 4 ++-- src/world/Territory/HousingZone.cpp | 4 ++-- src/world/Territory/Land.cpp | 12 ++++++------ src/world/Territory/Land.h | 14 +++++++------- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/common/Common.h b/src/common/Common.h index 9363426d..f986821a 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -866,13 +866,13 @@ namespace Sapphire::Common Mansion }; - enum HouseState : uint8_t + enum HouseStatus : uint8_t { none, - forSale, - sold, - privateHouse, - fcHouse, + HouseForSale, + HouseSold, + HousePrivateEstate, + HouseFreeCompanyEstate, }; enum HouseIconAdd : uint8_t diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 20dca94d..fd4ab7ef 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -179,8 +179,8 @@ void Sapphire::World::Manager::HousingMgr::initLandCache() entry.m_landId = res->getUInt( "LandId" ); entry.m_type = static_cast< Common::LandType >( res->getUInt( "Type" ) ); - entry.m_size = res->getUInt8( "Size" ); - entry.m_status = res->getUInt8( "Status" ); + entry.m_size = static_cast< Common::HouseSize >( res->getUInt8( "Size" ) ); + entry.m_status = static_cast< Common::HouseStatus >( res->getUInt8( "Status" ) ); entry.m_currentPrice = res->getUInt64( "LandPrice" ); entry.m_updateTime = res->getUInt64( "UpdateTime" ); entry.m_ownerId = res->getUInt64( "OwnerId" ); @@ -365,7 +365,7 @@ Sapphire::LandPurchaseResult Sapphire::World::Manager::HousingMgr::purchaseLand( if( !pLand ) return LandPurchaseResult::ERR_INTERNAL; - if( pLand->getState() != HouseState::forSale ) + if( pLand->getStatus() != HouseStatus::HouseForSale ) return LandPurchaseResult::ERR_NOT_AVAILABLE; if( gilAvailable < plotPrice ) @@ -388,7 +388,7 @@ Sapphire::LandPurchaseResult Sapphire::World::Manager::HousingMgr::purchaseLand( player.removeCurrency( CurrencyType::Gil, plotPrice ); pLand->setOwnerId( player.getId() ); - pLand->setState( HouseState::sold ); + pLand->setStatus( HouseStatus::HouseSold ); pLand->setLandType( Common::LandType::Private ); player.setLandFlags( LandFlagsSlot::Private, 0x00, pLand->getLandIdent() ); @@ -437,7 +437,7 @@ bool Sapphire::World::Manager::HousingMgr::relinquishLand( Entity::Player& playe pLand->setCurrentPrice( pLand->getMaxPrice() ); pLand->setOwnerId( 0 ); - pLand->setState( HouseState::forSale ); + pLand->setStatus( HouseStatus::HouseForSale ); pLand->setLandType( Common::LandType::none ); pLand->updateLandDb(); @@ -477,11 +477,11 @@ void Sapphire::World::Manager::HousingMgr::sendWardLandInfo( Entity::Player& pla auto& entry = wardInfoPacket->data().houseInfoEntry[ i ]; - // retail always sends the house price in this packet, even after the house has been sold + // retail always sends the house price in this packet, even after the house has been HouseSold // so I guess we do the same entry.housePrice = land->getCurrentPrice(); - if( land->getState() == Common::HouseState::forSale ) + if( land->getStatus() == Common::HouseStatus::HouseForSale ) continue; if( auto house = land->getHouse() ) @@ -682,7 +682,7 @@ void Sapphire::World::Manager::HousingMgr::buildPresetEstate( Entity::Player& pl createHouse( house ); - pLand->setState( HouseState::privateHouse ); + pLand->setStatus( HouseStatus::HousePrivateEstate ); pLand->setLandType( LandType::Private ); hZone->sendLandUpdate( plotNum ); diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index deb6c099..6b25ce57 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -31,8 +31,8 @@ namespace Sapphire::World::Manager uint16_t m_landId; Common::LandType m_type; - uint8_t m_size; - uint8_t m_status; + Common::HouseSize m_size; + Common::HouseStatus m_status; uint64_t m_currentPrice; diff --git a/src/world/Territory/HousingZone.cpp b/src/world/Territory/HousingZone.cpp index 3814b471..9f79defa 100644 --- a/src/world/Territory/HousingZone.cpp +++ b/src/world/Territory/HousingZone.cpp @@ -220,7 +220,7 @@ void Sapphire::HousingZone::sendLandSet( Entity::Player& player ) auto& landData = landsetInitializePacket->data().land[ count ]; landData.plotSize = pLand->getSize(); - landData.houseState = pLand->getState(); + landData.houseState = pLand->getStatus(); landData.iconAddIcon = pLand->getSharing(); landData.fcId = pLand->getFcId(); landData.fcIcon = pLand->getFcIcon(); @@ -256,7 +256,7 @@ void Sapphire::HousingZone::sendLandUpdate( uint8_t landId ) auto& landData = landUpdatePacket->data().land; landData.plotSize = pLand->getSize(); - landData.houseState = pLand->getState(); + landData.houseState = pLand->getStatus(); landData.iconAddIcon = pLand->getSharing(); landData.fcId = pLand->getFcId(); landData.fcIcon = pLand->getFcIcon(); diff --git a/src/world/Territory/Land.cpp b/src/world/Territory/Land.cpp index 432b473b..28e63e8a 100644 --- a/src/world/Territory/Land.cpp +++ b/src/world/Territory/Land.cpp @@ -54,7 +54,7 @@ Sapphire::Land::Land( uint16_t territoryTypeId, uint8_t wardNum, uint8_t landId, Sapphire::Land::~Land() = default; -void Sapphire::Land::init( Common::LandType type, uint8_t size, uint8_t state, uint32_t currentPrice, +void Sapphire::Land::init( Common::LandType type, Common::HouseSize size, Common::HouseStatus state, uint32_t currentPrice, uint64_t ownerId, uint64_t houseId ) { m_type = type; @@ -84,12 +84,12 @@ uint32_t Sapphire::Land::getMaxPrice() const } //Primary State -void Sapphire::Land::setSize( uint8_t size ) +void Sapphire::Land::setSize( Common::HouseSize size ) { m_size = size; } -void Sapphire::Land::setState( uint8_t state ) +void Sapphire::Land::setStatus( Common::HouseStatus state ) { m_state = state; } @@ -104,12 +104,12 @@ void Sapphire::Land::setLandType( Common::LandType type ) m_type = type; } -uint8_t Sapphire::Land::getSize() const +Sapphire::Common::HouseSize Sapphire::Land::getSize() const { return m_size; } -uint8_t Sapphire::Land::getState() const +Sapphire::Common::HouseStatus Sapphire::Land::getStatus() const { return m_state; } @@ -227,7 +227,7 @@ void Sapphire::Land::updateLandDb() void Sapphire::Land::update( uint32_t currTime ) { - if( getState() == HouseState::forSale ) + if( getStatus() == HouseStatus::HouseForSale ) { if( m_nextDrop < currTime && m_minPrice < m_currentPrice ) { diff --git a/src/world/Territory/Land.h b/src/world/Territory/Land.h index f6af5f2a..8eecbb33 100644 --- a/src/world/Territory/Land.h +++ b/src/world/Territory/Land.h @@ -18,20 +18,20 @@ namespace Sapphire Land( uint16_t zoneId, uint8_t wardNum, uint8_t landId, uint32_t landSetId, Sapphire::Data::HousingLandSetPtr info, FrameworkPtr pFw ); virtual ~Land(); - void init( Common::LandType type, uint8_t size, uint8_t state, uint32_t currentPrice, uint64_t ownerId, uint64_t houseId ); + void init( Common::LandType type, Common::HouseSize size, Common::HouseStatus state, uint32_t currentPrice, uint64_t ownerId, uint64_t houseId ); using LandInventoryMap = std::unordered_map< uint16_t, ItemContainerPtr >; using InvMaxItemsPair = std::pair< uint16_t, uint16_t >; //Primary state - void setSize( uint8_t size ); - void setState( uint8_t state ); + void setSize( Common::HouseSize size ); + void setStatus( Common::HouseStatus state ); void setSharing( uint8_t state ); void setLandType( Common::LandType type ); //Gerneral - uint8_t getSize() const; - uint8_t getState() const; + Common::HouseSize getSize() const; + Common::HouseStatus getStatus() const; uint8_t getSharing() const; uint32_t getLandSetId() const; Common::LandType getLandType() const; @@ -71,8 +71,8 @@ namespace Sapphire Common::LandIdent m_landIdent; uint32_t m_landSetId; - uint8_t m_size; - uint8_t m_state; + Common::HouseSize m_size; + Common::HouseStatus m_state; Common::LandType m_type; uint8_t m_iconAddIcon; uint32_t m_fcId; // unclear, may be wrong From 1c890a43bf369563f35ebc97c3dc1920ea4837bf Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 31 Dec 2018 22:02:34 +1100 Subject: [PATCH 76/86] handle fc doors properly --- src/common/Common.h | 8 ++++---- src/world/Manager/HousingMgr.cpp | 12 ++++++------ .../Territory/Housing/HousingInteriorTerritory.cpp | 13 +++++++++---- src/world/Territory/Land.cpp | 2 +- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/common/Common.h b/src/common/Common.h index f986821a..77d29367 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -869,10 +869,10 @@ namespace Sapphire::Common enum HouseStatus : uint8_t { none, - HouseForSale, - HouseSold, - HousePrivateEstate, - HouseFreeCompanyEstate, + ForSale, + Sold, + PrivateEstate, + FreeCompanyEstate, }; enum HouseIconAdd : uint8_t diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index fd4ab7ef..8e0c01a6 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -365,7 +365,7 @@ Sapphire::LandPurchaseResult Sapphire::World::Manager::HousingMgr::purchaseLand( if( !pLand ) return LandPurchaseResult::ERR_INTERNAL; - if( pLand->getStatus() != HouseStatus::HouseForSale ) + if( pLand->getStatus() != HouseStatus::ForSale ) return LandPurchaseResult::ERR_NOT_AVAILABLE; if( gilAvailable < plotPrice ) @@ -388,7 +388,7 @@ Sapphire::LandPurchaseResult Sapphire::World::Manager::HousingMgr::purchaseLand( player.removeCurrency( CurrencyType::Gil, plotPrice ); pLand->setOwnerId( player.getId() ); - pLand->setStatus( HouseStatus::HouseSold ); + pLand->setStatus( HouseStatus::Sold ); pLand->setLandType( Common::LandType::Private ); player.setLandFlags( LandFlagsSlot::Private, 0x00, pLand->getLandIdent() ); @@ -437,7 +437,7 @@ bool Sapphire::World::Manager::HousingMgr::relinquishLand( Entity::Player& playe pLand->setCurrentPrice( pLand->getMaxPrice() ); pLand->setOwnerId( 0 ); - pLand->setStatus( HouseStatus::HouseForSale ); + pLand->setStatus( HouseStatus::ForSale ); pLand->setLandType( Common::LandType::none ); pLand->updateLandDb(); @@ -477,11 +477,11 @@ void Sapphire::World::Manager::HousingMgr::sendWardLandInfo( Entity::Player& pla auto& entry = wardInfoPacket->data().houseInfoEntry[ i ]; - // retail always sends the house price in this packet, even after the house has been HouseSold + // 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->getStatus() == Common::HouseStatus::HouseForSale ) + if( land->getStatus() == Common::HouseStatus::ForSale ) continue; if( auto house = land->getHouse() ) @@ -682,7 +682,7 @@ void Sapphire::World::Manager::HousingMgr::buildPresetEstate( Entity::Player& pl createHouse( house ); - pLand->setStatus( HouseStatus::HousePrivateEstate ); + pLand->setStatus( HouseStatus::PrivateEstate ); pLand->setLandType( LandType::Private ); hZone->sendLandUpdate( plotNum ); diff --git a/src/world/Territory/Housing/HousingInteriorTerritory.cpp b/src/world/Territory/Housing/HousingInteriorTerritory.cpp index 63fb581e..6bef748b 100644 --- a/src/world/Territory/Housing/HousingInteriorTerritory.cpp +++ b/src/world/Territory/Housing/HousingInteriorTerritory.cpp @@ -76,14 +76,19 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone player.queuePacket( indoorInitPacket ); + bool isFcHouse = pLand->getStatus() == Common::HouseStatus::PrivateEstate; auto yardPacketTotal = static_cast< uint8_t >( 2 + pLand->getSize() ); for( uint8_t yardPacketNum = 0; yardPacketNum < yardPacketTotal; yardPacketNum++ ) { auto objectInitPacket = makeZonePacket< Server::FFXIVIpcHousingObjectInitialize >( player.getId() ); memcpy( &objectInitPacket->data().landIdent, &m_landIdent, sizeof( Common::LandIdent ) ); - // todo: change this when FC houses become a thing - objectInitPacket->data().u1 = 2; // 2 = actrl 0x400 will hide the fc door, otherwise it will stay there + + if( isFcHouse ) + objectInitPacket->data().u1 = 2; // 2 = actrl 0x400 will hide the fc door, otherwise it will stay there + else + objectInitPacket->data().u1 = 0; + objectInitPacket->data().u2 = 100; objectInitPacket->data().packetNum = yardPacketNum; objectInitPacket->data().packetTotal = yardPacketTotal; @@ -94,8 +99,8 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone player.queuePacket( objectInitPacket ); } - // todo: if in fc house, don't send this - player.queuePacket( Server::makeActorControl143( player.getId(), Network::ActorControl::HideAdditionalChambersDoor ) ); + if( isFcHouse ) + player.queuePacket( Server::makeActorControl143( player.getId(), Network::ActorControl::HideAdditionalChambersDoor ) ); } void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onUpdate( uint32_t currTime ) diff --git a/src/world/Territory/Land.cpp b/src/world/Territory/Land.cpp index 28e63e8a..15411d24 100644 --- a/src/world/Territory/Land.cpp +++ b/src/world/Territory/Land.cpp @@ -227,7 +227,7 @@ void Sapphire::Land::updateLandDb() void Sapphire::Land::update( uint32_t currTime ) { - if( getStatus() == HouseStatus::HouseForSale ) + if( getStatus() == HouseStatus::ForSale ) { if( m_nextDrop < currTime && m_minPrice < m_currentPrice ) { From d421888a07cef6dc39669c4a3f5e408478c5b3aa Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 31 Dec 2018 22:45:39 +1100 Subject: [PATCH 77/86] fix storing items in the housing storerooms for real this time --- src/world/Manager/HousingMgr.cpp | 24 ++++++++++++++++-------- src/world/Manager/HousingMgr.h | 2 ++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index 8e0c01a6..5fda5ef4 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -568,7 +568,7 @@ bool Sapphire::World::Manager::HousingMgr::initHouseModels( Entity::Player& play if( !player.findFirstItemWithId( presetCatalogId, foundItem ) ) return false; - auto item = player.dropInventoryItem( foundItem.first, foundItem.second ); + auto item = getHousingItemFromPlayer( player, foundItem.first, foundItem.second ); if( !item ) return false; @@ -1002,12 +1002,10 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceHousingItem( Sapphire::Entity containerId == InventoryType::Bag2 || containerId == InventoryType::Bag3 ) { - auto tmpItem = player.dropInventoryItem( static_cast< Common::InventoryType >( containerId ), slotId ); - if( !tmpItem ) + item = getHousingItemFromPlayer( player, static_cast< Common::InventoryType >( containerId ), slotId ); + if( !item ) return; - item = Inventory::make_HousingItem( tmpItem->getUId(), tmpItem->getId(), framework() ); - // set params item->setPos( { Util::floatToUInt16( pos.x ), @@ -1074,7 +1072,7 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceItemInStore( Sapphire::Entity if( freeSlot == -1 ) return; - auto item = player.dropInventoryItem( static_cast< Common::InventoryType >( containerId ), slotId ); + auto item = getHousingItemFromPlayer( player, static_cast< Common::InventoryType >( containerId ), slotId ); if( !item ) return; @@ -1097,7 +1095,7 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceItemInStore( Sapphire::Entity continue; } - auto item = player.dropInventoryItem( static_cast< Common::InventoryType >( containerId ), slotId ); + auto item = getHousingItemFromPlayer( player, static_cast< Common::InventoryType >( containerId ), slotId ); if( !item ) return; @@ -1386,7 +1384,7 @@ bool Sapphire::World::Manager::HousingMgr::removeInternalItem( Entity::Player& p { auto& containers = getEstateInventory( terri.getLandIdent() ); - uint8_t containerIdx = 0; + int8_t containerIdx = 0; if( isPlacedItemsInventory( static_cast< Common::InventoryType >( containerId ) ) ) { @@ -1617,4 +1615,14 @@ bool Sapphire::World::Manager::HousingMgr::hasPermission( Sapphire::Entity::Play // todo: check perms here return false; +} + +Sapphire::Inventory::HousingItemPtr Sapphire::World::Manager::HousingMgr::getHousingItemFromPlayer( + Entity::Player& player, Common::InventoryType type, uint8_t slot ) +{ + auto tmpItem = player.dropInventoryItem( type, slot ); + if( !tmpItem ) + return nullptr; + + return Inventory::make_HousingItem( tmpItem->getUId(), tmpItem->getId(), framework() ); } \ No newline at end of file diff --git a/src/world/Manager/HousingMgr.h b/src/world/Manager/HousingMgr.h index 6b25ce57..8167efb9 100644 --- a/src/world/Manager/HousingMgr.h +++ b/src/world/Manager/HousingMgr.h @@ -185,6 +185,8 @@ namespace Sapphire::World::Manager private: + Inventory::HousingItemPtr getHousingItemFromPlayer( Entity::Player& player, Common::InventoryType type, uint8_t slot ); + ItemContainerPtr getFreeEstateInventorySlot( Common::LandIdent ident, Inventory::InventoryContainerPair& pair, Inventory::InventoryTypeList bagList ); From af7a7694339b50fc0d59ed90a6fb5f107eac9d2b Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 31 Dec 2018 23:20:36 +1100 Subject: [PATCH 78/86] start of marketboard implementation --- src/common/Network/PacketDef/Ipcs.h | 2 +- .../Network/PacketDef/Zone/ClientZoneDef.h | 13 +++++++++++ src/world/Manager/MarketMgr.cpp | 19 ++++++++++++++++ src/world/Manager/MarketMgr.h | 22 +++++++++++++++++++ src/world/Manager/PlayerMgr.h | 7 +++++- src/world/Network/GameConnection.h | 2 ++ src/world/Network/Handlers/PacketHandlers.cpp | 13 +++++++++++ src/world/ServerMgr.cpp | 10 +++++++++ 8 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 src/world/Manager/MarketMgr.cpp create mode 100644 src/world/Manager/MarketMgr.h diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index ede6ed36..40855781 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -267,7 +267,7 @@ namespace Sapphire::Network::Packets MarketBoardRequestItemInformation = 0x00FE, // updated 4.4 MarketBoardRequestItemListings = 0x00FF, // updated 4.4 - SearchMarketboard = 0x0103, // updated 4.3 + SearchMarketboard = 0x0103, // updated 4.4 ReqExamineFcInfo = 0x010F, // updated 4.1 FcInfoReqHandler = 0x011A, // updated 4.2 diff --git a/src/common/Network/PacketDef/Zone/ClientZoneDef.h b/src/common/Network/PacketDef/Zone/ClientZoneDef.h index e096fa8a..68b856b8 100644 --- a/src/common/Network/PacketDef/Zone/ClientZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ClientZoneDef.h @@ -270,6 +270,19 @@ struct FFXIVIpcHousingUpdateObjectPosition : /* 001C */ uint32_t padding; }; +struct FFXIVIpcSearchMarketboard : + FFXIVIpcBasePacket< SearchMarketboard > +{ + /* 0000 */ uint32_t unk; + /* 0004 */ uint8_t unk2[2]; + /* 0006 */ uint8_t itemSearchCategory; + /* 0007 */ uint8_t shouldCheckClassJobId; // wat? seems only 1 there at least... + /* 0008 */ uint8_t maxEquipLevel; + /* 0009 */ uint8_t classJobId; + /* 000A */ char searchStr[40]; + /* 0032 */ uint16_t unk4[43]; +}; + } } } diff --git a/src/world/Manager/MarketMgr.cpp b/src/world/Manager/MarketMgr.cpp new file mode 100644 index 00000000..1769a6e8 --- /dev/null +++ b/src/world/Manager/MarketMgr.cpp @@ -0,0 +1,19 @@ +#include "MarketMgr.h" + +Sapphire::World::Manager::MarketMgr::MarketMgr( Sapphire::FrameworkPtr pFw ) : + BaseManager( pFw ) +{ + +} + +bool Sapphire::World::Manager::MarketMgr::init() +{ + return true; +} + +void Sapphire::World::Manager::MarketMgr::searchMarketboard( Entity::Player& player, + uint8_t itemSearchCategory, uint8_t maxEquipLevel, + uint8_t classJob ) +{ + +} \ No newline at end of file diff --git a/src/world/Manager/MarketMgr.h b/src/world/Manager/MarketMgr.h new file mode 100644 index 00000000..9c21c8ed --- /dev/null +++ b/src/world/Manager/MarketMgr.h @@ -0,0 +1,22 @@ +#ifndef SAPPHIRE_MARKETMGR_H +#define SAPPHIRE_MARKETMGR_H + +#include "ForwardsZone.h" +#include "BaseManager.h" + +namespace Sapphire::World::Manager +{ + class MarketMgr : public Manager::BaseManager + { + public: + explicit MarketMgr( FrameworkPtr pFw ); + + bool init(); + + void searchMarketboard( Entity::Player& player, uint8_t itemSearchCategory, uint8_t maxEquipLevel, uint8_t classJob ); + + }; +} + + +#endif //SAPPHIRE_MARKETMGR_H diff --git a/src/world/Manager/PlayerMgr.h b/src/world/Manager/PlayerMgr.h index 0b0cbd13..f7d08488 100644 --- a/src/world/Manager/PlayerMgr.h +++ b/src/world/Manager/PlayerMgr.h @@ -1,3 +1,6 @@ +#ifndef SAPPHIRE_PLAYERMGR_H +#define SAPPHIRE_PLAYERMGR_H + #include "ForwardsZone.h" #include "BaseManager.h" @@ -10,4 +13,6 @@ class PlayerMgr : public Manager::BaseManager void movePlayerToLandDestination( Sapphire::Entity::Player& player, uint32_t landId, uint16_t param = 0 ); }; -} \ No newline at end of file +} + +#endif // SAPPHIRE_PLAYERMGR_H \ No newline at end of file diff --git a/src/world/Network/GameConnection.h b/src/world/Network/GameConnection.h index dcdec9d1..c4984267 100644 --- a/src/world/Network/GameConnection.h +++ b/src/world/Network/GameConnection.h @@ -176,6 +176,8 @@ namespace Sapphire::Network DECLARE_HANDLER( reqMoveHousingItem ); + DECLARE_HANDLER( searchMarketboard ); + }; } diff --git a/src/world/Network/Handlers/PacketHandlers.cpp b/src/world/Network/Handlers/PacketHandlers.cpp index fa6543bf..580b0629 100644 --- a/src/world/Network/Handlers/PacketHandlers.cpp +++ b/src/world/Network/Handlers/PacketHandlers.cpp @@ -36,6 +36,7 @@ #include "Manager/DebugCommandMgr.h" #include "Manager/EventMgr.h" +#include "Manager/MarketMgr.h" #include "Action/Action.h" #include "Action/ActionTeleport.h" @@ -752,4 +753,16 @@ void Sapphire::Network::GameConnection::reqMoveHousingItem( FrameworkPtr pFw, housingMgr->reqMoveHousingItem( player, data.ident, data.slot, data.pos, data.rotation ); +} + +void Sapphire::Network::GameConnection::searchMarketboard( FrameworkPtr pFw, + const Sapphire::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, + Entity::Player& player ) +{ + auto marketMgr = pFw->get< MarketMgr >(); + + const auto packet = ZoneChannelPacket< Client::FFXIVIpcSearchMarketboard >( inPacket ); + const auto& data = packet.data(); + + marketMgr->searchMarketboard( player, data.itemSearchCategory, data.maxEquipLevel, data.classJobId ); } \ No newline at end of file diff --git a/src/world/ServerMgr.cpp b/src/world/ServerMgr.cpp index cc89386a..316f6460 100644 --- a/src/world/ServerMgr.cpp +++ b/src/world/ServerMgr.cpp @@ -39,6 +39,7 @@ #include "Manager/InventoryMgr.h" #include "Manager/EventMgr.h" #include "Manager/ItemMgr.h" +#include "Manager/MarketMgr.h" using namespace Sapphire::World::Manager; @@ -160,6 +161,15 @@ void Sapphire::World::ServerMgr::run( int32_t argc, char* argv[] ) return; } + auto pMarketMgr = std::make_shared< Manager::MarketMgr >( framework() ); + framework()->set< Manager::MarketMgr >( pMarketMgr ); + + if( !pMarketMgr->init() ) + { + Logger::fatal( "Failed to setup market manager!" ); + return; + } + loadBNpcTemplates(); Network::HivePtr hive( new Network::Hive() ); From 589205d41eda20264581e0728c077895e2578da3 Mon Sep 17 00:00:00 2001 From: Mordred Date: Mon, 31 Dec 2018 13:54:31 +0100 Subject: [PATCH 79/86] Moved cmake logic to root cmakelists --- cmake/compiler.cmake | 11 ++---- deps/datReader/CMakeLists.txt | 6 ---- deps/mysqlConnector/CMakeLists.txt | 6 ---- src/api/CMakeLists.txt | 3 -- src/common/CMakeLists.txt | 3 -- src/dbm/CMakeLists.txt | 3 -- src/lobby/CMakeLists.txt | 3 -- src/scripts/CMakeLists.txt | 3 -- src/tools/discovery_parser/CMakeLists.txt | 3 -- src/tools/event_object_parser/CMakeLists.txt | 3 -- src/tools/exd_common_gen/CMakeLists.txt | 3 -- src/tools/exd_struct_gen/CMakeLists.txt | 3 -- src/tools/exd_struct_test/CMakeLists.txt | 3 -- src/tools/mob_parse/CMakeLists.txt | 3 -- src/tools/pcb_reader/CMakeLists.txt | 3 -- src/tools/quest_parser/CMakeLists.txt | 3 -- src/world/Actor/SpawnGroup.h | 2 +- src/world/CMakeLists.txt | 3 -- src/world/ForwardsZone.h | 2 ++ src/world/Territory/Zone.cpp | 36 +++++++++++++++++--- src/world/Territory/Zone.h | 2 ++ 21 files changed, 40 insertions(+), 67 deletions(-) diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index 99bd6428..f8fa19b2 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -9,14 +9,9 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHc") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") - - if (MSVC_VERSION GREATER_EQUAL "1900") - include(CheckCXXCompilerFlag) - CHECK_CXX_COMPILER_FLAG("/std:c++latest" _cpp_latest_flag_supported) - if (_cpp_latest_flag_supported) - add_compile_options("/std:c++latest") - endif() - endif() + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS ON) if(CMAKE_BUILD_TYPE STREQUAL "Debug") # disabling SAFESEH diff --git a/deps/datReader/CMakeLists.txt b/deps/datReader/CMakeLists.txt index a8c7ec6c..70b469ba 100644 --- a/deps/datReader/CMakeLists.txt +++ b/deps/datReader/CMakeLists.txt @@ -10,12 +10,6 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) add_library( xivdat ${UTILS_PUBLIC_INCLUDE_FILES} ${UTILS_SOURCE_FILES} ) -set_target_properties( xivdat PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON - ) - if (UNIX) target_link_libraries( xivdat PUBLIC dl ) target_link_libraries( xivdat PUBLIC z ) diff --git a/deps/mysqlConnector/CMakeLists.txt b/deps/mysqlConnector/CMakeLists.txt index 76f2f97f..1bff9537 100644 --- a/deps/mysqlConnector/CMakeLists.txt +++ b/deps/mysqlConnector/CMakeLists.txt @@ -9,12 +9,6 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) add_library( mysqlConnector ${UTILS_PUBLIC_INCLUDE_FILES} ${UTILS_SOURCE_FILES} ) -set_target_properties( mysqlConnector PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON - ) - target_include_directories( mysqlConnector PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) target_link_libraries( mysqlConnector PUBLIC mysql ) #cotire(mysqlConnector) diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt index baca5da6..a9eca8ca 100644 --- a/src/api/CMakeLists.txt +++ b/src/api/CMakeLists.txt @@ -8,9 +8,6 @@ file( GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*" ) add_executable( api ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) set_target_properties( api PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index d8579e93..00f863c9 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -18,9 +18,6 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) add_library( common ${UTILS_PUBLIC_INCLUDE_FILES} ${UTILS_SOURCE_FILES} ) set_target_properties( common PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" diff --git a/src/dbm/CMakeLists.txt b/src/dbm/CMakeLists.txt index f731b609..278cbd99 100644 --- a/src/dbm/CMakeLists.txt +++ b/src/dbm/CMakeLists.txt @@ -8,9 +8,6 @@ file( GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*" ) add_executable( dbm ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) set_target_properties( dbm PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" diff --git a/src/lobby/CMakeLists.txt b/src/lobby/CMakeLists.txt index fc4e2067..48a9596c 100644 --- a/src/lobby/CMakeLists.txt +++ b/src/lobby/CMakeLists.txt @@ -10,9 +10,6 @@ add_executable( lobby ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) set_target_properties( lobby PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt index 9d6f39f2..a049fc96 100644 --- a/src/scripts/CMakeLists.txt +++ b/src/scripts/CMakeLists.txt @@ -40,9 +40,6 @@ foreach(_scriptDir ${children}) if(MSVC) set_target_properties( "script_${_name}" PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON LIBRARY_OUTPUT_DIRECTORY_DEBUG "${SCRIPT_LIB_DIR}" LIBRARY_OUTPUT_DIRECTORY_RELEASE "${SCRIPT_LIB_DIR}" LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${SCRIPT_LIB_DIR}" diff --git a/src/tools/discovery_parser/CMakeLists.txt b/src/tools/discovery_parser/CMakeLists.txt index e75e09b0..72d3f831 100644 --- a/src/tools/discovery_parser/CMakeLists.txt +++ b/src/tools/discovery_parser/CMakeLists.txt @@ -17,9 +17,6 @@ file(GLOB SERVER_SOURCE_FILES add_executable(discovery_parser ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES}) set_target_properties(discovery_parser PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" diff --git a/src/tools/event_object_parser/CMakeLists.txt b/src/tools/event_object_parser/CMakeLists.txt index b6e41fe7..153ec3ba 100644 --- a/src/tools/event_object_parser/CMakeLists.txt +++ b/src/tools/event_object_parser/CMakeLists.txt @@ -14,9 +14,6 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*") add_executable(event_object_parser ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES}) set_target_properties(event_object_parser PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" diff --git a/src/tools/exd_common_gen/CMakeLists.txt b/src/tools/exd_common_gen/CMakeLists.txt index 78f2714f..44f19de3 100644 --- a/src/tools/exd_common_gen/CMakeLists.txt +++ b/src/tools/exd_common_gen/CMakeLists.txt @@ -11,9 +11,6 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*") add_executable(exd_common_gen ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES}) set_target_properties(exd_common_gen PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" diff --git a/src/tools/exd_struct_gen/CMakeLists.txt b/src/tools/exd_struct_gen/CMakeLists.txt index e4fef2d0..c2a72377 100644 --- a/src/tools/exd_struct_gen/CMakeLists.txt +++ b/src/tools/exd_struct_gen/CMakeLists.txt @@ -14,9 +14,6 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*") add_executable(exd_struct_gen ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES}) set_target_properties(exd_struct_gen PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" diff --git a/src/tools/exd_struct_test/CMakeLists.txt b/src/tools/exd_struct_test/CMakeLists.txt index 2e89b09c..0f05b4e3 100644 --- a/src/tools/exd_struct_test/CMakeLists.txt +++ b/src/tools/exd_struct_test/CMakeLists.txt @@ -12,9 +12,6 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*") add_executable(exd_struct_test ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES}) set_target_properties(exd_struct_test PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" diff --git a/src/tools/mob_parse/CMakeLists.txt b/src/tools/mob_parse/CMakeLists.txt index 06e8f9e6..db59308f 100644 --- a/src/tools/mob_parse/CMakeLists.txt +++ b/src/tools/mob_parse/CMakeLists.txt @@ -12,9 +12,6 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*") add_executable(mob_parse ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES}) set_target_properties(mob_parse PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" diff --git a/src/tools/pcb_reader/CMakeLists.txt b/src/tools/pcb_reader/CMakeLists.txt index 7a330175..46eccf0f 100644 --- a/src/tools/pcb_reader/CMakeLists.txt +++ b/src/tools/pcb_reader/CMakeLists.txt @@ -12,9 +12,6 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*") add_executable(pcb_reader2 ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES}) set_target_properties(pcb_reader2 PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" diff --git a/src/tools/quest_parser/CMakeLists.txt b/src/tools/quest_parser/CMakeLists.txt index 51609ba5..ccd4098f 100644 --- a/src/tools/quest_parser/CMakeLists.txt +++ b/src/tools/quest_parser/CMakeLists.txt @@ -20,9 +20,6 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*") add_executable(quest_parse ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES}) set_target_properties(quest_parse PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../bin/" diff --git a/src/world/Actor/SpawnGroup.h b/src/world/Actor/SpawnGroup.h index 6ba85a50..5f5fb95a 100644 --- a/src/world/Actor/SpawnGroup.h +++ b/src/world/Actor/SpawnGroup.h @@ -3,7 +3,7 @@ #include "ForwardsZone.h" -namespace Core::Entity +namespace Sapphire::Entity { class SpawnGroup diff --git a/src/world/CMakeLists.txt b/src/world/CMakeLists.txt index 98583cba..0542fc26 100644 --- a/src/world/CMakeLists.txt +++ b/src/world/CMakeLists.txt @@ -24,9 +24,6 @@ file( GLOB SERVER_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} add_executable( world ${SERVER_SOURCE_FILES} ) set_target_properties( world PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON ENABLE_EXPORTS ON WINDOWS_EXPORT_ALL_SYMBOLS ON RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" diff --git a/src/world/ForwardsZone.h b/src/world/ForwardsZone.h index 6694111d..4437ac84 100644 --- a/src/world/ForwardsZone.h +++ b/src/world/ForwardsZone.h @@ -66,6 +66,8 @@ TYPE_FORWARD( Player ); TYPE_FORWARD( EventObject ); TYPE_FORWARD( BNpcTemplate ); TYPE_FORWARD( BNpc ); +TYPE_FORWARD( SpawnPoint ); +TYPE_FORWARD( SpawnGroup ); } namespace Event diff --git a/src/world/Territory/Zone.cpp b/src/world/Territory/Zone.cpp index 699a1dfd..98cd1df5 100644 --- a/src/world/Territory/Zone.cpp +++ b/src/world/Territory/Zone.cpp @@ -24,6 +24,8 @@ #include "Actor/BNpc.h" #include "Actor/Player.h" #include "Actor/EventObject.h" +#include "Actor/SpawnGroup.h" +#include "Actor/SpawnPoint.h" #include "Network/GameConnection.h" @@ -116,7 +118,6 @@ bool Sapphire::Zone::init() // all good } - return true; } @@ -679,14 +680,14 @@ void Sapphire::Zone::onPlayerZoneIn( Entity::Player& player ) { Logger::debug( "Zone::onEnterTerritory: Zone#" + std::to_string( getGuId() ) + "|" + std::to_string( getTerritoryTypeId() ) + - +", Entity#" + std::to_string( player.getId() ) ); + + ", Entity#" + std::to_string( player.getId() ) ); } void Sapphire::Zone::onLeaveTerritory( Entity::Player& player ) { Logger::debug( "Zone::onLeaveTerritory: Zone#" + std::to_string( getGuId() ) + "|" + std::to_string( getTerritoryTypeId() ) + - +", Entity#" + std::to_string( player.getId() ) ); + + ", Entity#" + std::to_string( player.getId() ) ); } void Sapphire::Zone::onUpdate( uint32_t currTime ) @@ -757,4 +758,31 @@ Sapphire::Entity::EventObjectPtr Sapphire::Zone::registerEObj( const std::string Sapphire::Data::TerritoryTypePtr Sapphire::Zone::getTerritoryTypeInfo() const { return m_territoryTypeInfo; -} \ No newline at end of file +} + +bool Sapphire::Zone::loadSpawnGroups() +{ + auto pDb = m_pFw->get< Db::DbWorkerPool< Db::ZoneDbConnection > >(); + auto res = pDb->query( "SELECT id, bNpcTemplateId, " + "level, maxHp " + "FROM spawnGroup " + "WHERE territoryTypeId = " + std::to_string( getTerritoryTypeId() ) + ";" ); + + while( res->next() ) + { + uint32_t id = res->getUInt( 1 ); + uint32_t templateId = res->getUInt( 2 ); + uint32_t level = res->getUInt( 3 ); + uint32_t maxHp = res->getUInt( 4 ); + + //Entity::SpawnGroup group; + + Logger::debug( std::to_string( id ) + " " + + std::to_string( templateId ) + " " + + std::to_string( level ) + " " + + std::to_string( maxHp ) ); + + } + + return false; +} diff --git a/src/world/Territory/Zone.h b/src/world/Territory/Zone.h index e504c899..812b7d8a 100644 --- a/src/world/Territory/Zone.h +++ b/src/world/Territory/Zone.h @@ -134,6 +134,8 @@ namespace Sapphire void loadWeatherRates(); + bool loadSpawnGroups(); + bool checkWeather(); //void updateBnpcs( int64_t tickCount ); From 959c2d4319f2c14a3f19daa3f4068515869102af Mon Sep 17 00:00:00 2001 From: Mordred Date: Mon, 31 Dec 2018 17:30:45 +0100 Subject: [PATCH 80/86] Simplified some cmake logic --- CMakeLists.txt | 12 ++++--- cmake/compiler.cmake | 51 +++++++++++++++++------------- src/api/CMakeLists.txt | 8 ----- src/dbm/CMakeLists.txt | 8 +---- src/lobby/CMakeLists.txt | 8 ----- src/scripts/CMakeLists.txt | 1 - src/scripts/quest/ScriptLoader.cpp | 4 +++ src/world/CMakeLists.txt | 20 ++++++------ 8 files changed, 52 insertions(+), 60 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a53f793..a2a23030 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,13 +8,17 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin ) set( LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin ) set( EXECUTABLE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin ) -set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake ) +set( CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + ${CMAKE_SOURCE_DIR}/cmake ) -########################################################################## -# Dependencies and compiler settings +###################################### +# Dependencies and compiler settings # +###################################### include( "cmake/mysql.cmake" ) include( "cmake/compiler.cmake" ) include( "cmake/cotire.cmake" ) + ############################## # Git # ############################## @@ -49,4 +53,4 @@ add_subdirectory( "src/tools/quest_parser" ) add_subdirectory( "src/tools/discovery_parser" ) add_subdirectory( "src/tools/mob_parse" ) add_subdirectory( "src/tools/pcb_reader" ) -add_subdirectory( "src/tools/event_object_parser" ) +add_subdirectory( "src/tools/event_object_parser" ) \ No newline at end of file diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index f8fa19b2..8d203ba7 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -1,36 +1,43 @@ -if(UNIX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fPIC") -# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") +if( UNIX ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fPIC" ) else() - add_definitions(-D_WIN32_WINNT=0x601) - add_definitions(-D_CRT_SECURE_NO_WARNINGS) - add_definitions(-DNOMINMAX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHc") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") - set(CMAKE_CXX_STANDARD 17) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS ON) + add_definitions( -D_WIN32_WINNT=0x601 ) + add_definitions( -D_CRT_SECURE_NO_WARNINGS ) + add_definitions( -DNOMINMAX ) + + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHc" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" ) + set( CMAKE_CXX_STANDARD 17 ) + set( CMAKE_CXX_STANDARD_REQUIRED ON ) + set( CMAKE_CXX_EXTENSIONS ON ) - if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) + set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) + + set( VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin/" ) + + if( CMAKE_BUILD_TYPE STREQUAL "Debug" ) # disabling SAFESEH - message(STATUS "Disabling Safe Exception Handlers..") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") + message( STATUS "Disabling Safe Exception Handlers.." ) + set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO" ) # edit and continue - message(STATUS "Enabling Edit and Continue..") - add_definitions(/Zi) + message( STATUS "Enabling Edit and Continue.." ) + add_definitions( /Zi ) # incremental linking - message(STATUS "Enabling Incremental Linking..") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL") + message( STATUS "Enabling Incremental Linking.." ) + set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL" ) # enable building with multiple processes - message(STATUS "Enabling Build with Multiple Processes..") - add_definitions(/MP) + message( STATUS "Enabling Build with Multiple Processes.." ) + add_definitions( /MP ) endif() endif() # force standalone asio -add_definitions( -DASIO_STANDALONE ) +add_definitions( -DASIO_STANDALONE ) \ No newline at end of file diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt index a9eca8ca..83279c18 100644 --- a/src/api/CMakeLists.txt +++ b/src/api/CMakeLists.txt @@ -7,14 +7,6 @@ file( GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*" ) add_executable( api ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) -set_target_properties( api PROPERTIES - RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" -) - target_link_libraries( api common ) if( UNIX ) target_link_libraries( api mysqlclient stdc++fs ) diff --git a/src/dbm/CMakeLists.txt b/src/dbm/CMakeLists.txt index 278cbd99..eb6b7aa1 100644 --- a/src/dbm/CMakeLists.txt +++ b/src/dbm/CMakeLists.txt @@ -7,18 +7,12 @@ file( GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*" ) add_executable( dbm ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) -set_target_properties( dbm PROPERTIES - RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" -) - target_include_directories( dbm PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../" ) + target_link_libraries( dbm PRIVATE mysqlConnector common xivdat ) if (UNIX) target_link_libraries( dbm PRIVATE stdc++fs ) diff --git a/src/lobby/CMakeLists.txt b/src/lobby/CMakeLists.txt index 48a9596c..ce70e468 100644 --- a/src/lobby/CMakeLists.txt +++ b/src/lobby/CMakeLists.txt @@ -8,14 +8,6 @@ file( GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*" ) add_executable( lobby ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) -set_target_properties( lobby - PROPERTIES - RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" -) target_link_libraries( lobby PRIVATE common diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt index a049fc96..710f957d 100644 --- a/src/scripts/CMakeLists.txt +++ b/src/scripts/CMakeLists.txt @@ -10,7 +10,6 @@ set(EXECUTABLE_OUTPUT_PATH "${SCRIPT_LIB_DIR}") set(LIBRARY_OUTPUT_PATH "${SCRIPT_LIB_DIR}") set(RUNTIME_OUTPUT_DIRECTORY "${SCRIPT_LIB_DIR}") - file(GLOB children "${CMAKE_CURRENT_SOURCE_DIR}/*" ) foreach(_scriptDir ${children}) get_filename_component(_name "${_scriptDir}" NAME_WE) diff --git a/src/scripts/quest/ScriptLoader.cpp b/src/scripts/quest/ScriptLoader.cpp index 2c05f339..d3bb8b6d 100644 --- a/src/scripts/quest/ScriptLoader.cpp +++ b/src/scripts/quest/ScriptLoader.cpp @@ -13,6 +13,7 @@ #include "subquest/gridania/SubFst002.cpp" #include "subquest/gridania/SubFst003.cpp" #include "subquest/gridania/SubFst004.cpp" +#include "subquest/gridania/SubFst005.cpp" #include "subquest/gridania/SubFst008.cpp" #include "subquest/gridania/SubFst009.cpp" #include "subquest/gridania/SubFst010.cpp" @@ -25,6 +26,7 @@ #include "subquest/gridania/SubFst029.cpp" #include "subquest/gridania/SubFst030.cpp" #include "subquest/gridania/SubFst041.cpp" +#include "subquest/gridania/SubFst045.cpp" #include "subquest/limsa/SubSea001.cpp" #include "subquest/uldah/SubWil000.cpp" #include "subquest/uldah/SubWil001.cpp" @@ -55,6 +57,7 @@ const Sapphire::ScriptAPI::ScriptObject* ptrs[] = static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst002 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst003 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst004 ), + static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst005 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst008 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst009 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst010 ), @@ -67,6 +70,7 @@ const Sapphire::ScriptAPI::ScriptObject* ptrs[] = static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst029 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst030 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst041 ), + static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubFst045 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubSea001 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubWil000 ), static_cast< Sapphire::ScriptAPI::ScriptObject* >( new SubWil001 ), diff --git a/src/world/CMakeLists.txt b/src/world/CMakeLists.txt index 0542fc26..3c223058 100644 --- a/src/world/CMakeLists.txt +++ b/src/world/CMakeLists.txt @@ -23,19 +23,19 @@ file( GLOB SERVER_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} add_executable( world ${SERVER_SOURCE_FILES} ) -set_target_properties( world PROPERTIES - ENABLE_EXPORTS ON - WINDOWS_EXPORT_ALL_SYMBOLS ON - RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" +set_target_properties( world + PROPERTIES + ENABLE_EXPORTS ON + WINDOWS_EXPORT_ALL_SYMBOLS ON ) -target_link_libraries( world PUBLIC common ) -target_include_directories( world PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" ) +target_link_libraries( world + PUBLIC + common ) +target_include_directories( world + PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}" ) if( UNIX ) From 50d1d9d4928de64e173f84795ad90838de477a01 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Tue, 1 Jan 2019 11:51:48 +1100 Subject: [PATCH 81/86] correctly send marketboard item list --- src/common/Network/PacketDef/Ipcs.h | 2 +- .../Network/PacketDef/Zone/ClientZoneDef.h | 20 +++- .../Network/PacketDef/Zone/ServerZoneDef.h | 5 +- src/world/Manager/MarketMgr.cpp | 106 +++++++++++++++++- src/world/Manager/MarketMgr.h | 35 +++++- src/world/Network/GameConnection.cpp | 4 + src/world/Network/GameConnection.h | 4 +- src/world/Network/Handlers/PacketHandlers.cpp | 20 +++- 8 files changed, 177 insertions(+), 19 deletions(-) diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index 40855781..c1875da3 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -266,8 +266,8 @@ namespace Sapphire::Network::Packets MarketBoardRequestItemInformation = 0x00FE, // updated 4.4 MarketBoardRequestItemListings = 0x00FF, // updated 4.4 + MarketBoardSearch = 0x0103, // updated 4.4 - SearchMarketboard = 0x0103, // updated 4.4 ReqExamineFcInfo = 0x010F, // updated 4.1 FcInfoReqHandler = 0x011A, // updated 4.2 diff --git a/src/common/Network/PacketDef/Zone/ClientZoneDef.h b/src/common/Network/PacketDef/Zone/ClientZoneDef.h index 68b856b8..e312d790 100644 --- a/src/common/Network/PacketDef/Zone/ClientZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ClientZoneDef.h @@ -237,8 +237,9 @@ struct FFXIVIpcSetSharedEstateSettings : struct FFXIVIpcMarketBoardRequestItemListings : FFXIVIpcBasePacket< MarketBoardRequestItemListings > { - /* 0000 */ uint32_t itemCatalogId; - /* 0004 */ uint32_t padding; + /* 0000 */ uint16_t padding1; + /* 0002 */ uint16_t itemCatalogId; + /* 0004 */ uint32_t padding2; }; struct FFXIVIpcReqPlaceHousingItem : @@ -270,11 +271,11 @@ struct FFXIVIpcHousingUpdateObjectPosition : /* 001C */ uint32_t padding; }; -struct FFXIVIpcSearchMarketboard : - FFXIVIpcBasePacket< SearchMarketboard > +struct FFXIVIpcMarketBoardSearch : + FFXIVIpcBasePacket< MarketBoardSearch > { - /* 0000 */ uint32_t unk; - /* 0004 */ uint8_t unk2[2]; + /* 0000 */ uint32_t startIdx; + /* 0004 */ uint16_t requestId; /* 0006 */ uint8_t itemSearchCategory; /* 0007 */ uint8_t shouldCheckClassJobId; // wat? seems only 1 there at least... /* 0008 */ uint8_t maxEquipLevel; @@ -283,6 +284,13 @@ struct FFXIVIpcSearchMarketboard : /* 0032 */ uint16_t unk4[43]; }; +struct FFXIVIpcMarketBoardRequestItemInformation : + FFXIVIpcBasePacket< MarketBoardRequestItemInformation > +{ + /* 0000 */ uint32_t catalogId; + /* 0000 */ uint32_t requestId; +}; + } } } diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 63ea03ba..2c5a8d8e 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -1847,13 +1847,14 @@ struct FFXIVIpcMarketBoardSearchResult : struct MarketBoardItem { uint32_t itemCatalogId; - uint32_t quantity; + uint16_t quantity; + uint16_t demand; } items[20]; uint32_t itemIndexEnd; uint32_t padding1; uint32_t itemIndexStart; - uint32_t padding2; + uint32_t requestId; }; struct FFFXIVIpcMarketBoardItemListingCount : diff --git a/src/world/Manager/MarketMgr.cpp b/src/world/Manager/MarketMgr.cpp index 1769a6e8..b850f1bc 100644 --- a/src/world/Manager/MarketMgr.cpp +++ b/src/world/Manager/MarketMgr.cpp @@ -1,5 +1,17 @@ #include "MarketMgr.h" +#include +#include +#include + +#include +#include +#include + +#include "Actor/Player.h" + +using namespace Sapphire::Network::Packets; + Sapphire::World::Manager::MarketMgr::MarketMgr( Sapphire::FrameworkPtr pFw ) : BaseManager( pFw ) { @@ -8,12 +20,98 @@ Sapphire::World::Manager::MarketMgr::MarketMgr( Sapphire::FrameworkPtr pFw ) : bool Sapphire::World::Manager::MarketMgr::init() { + Logger::info( "MarketMgr: warming up marketable item cache..." ); + + // build item cache + auto exdData = framework()->get< Sapphire::Data::ExdDataGenerated >(); + auto idList = exdData->getItemIdList(); + + for( auto id : idList ) + { + auto item = exdData->get< Sapphire::Data::Item >( id ); + if( !item ) + continue; + + if( item->isUntradable ) + continue; + + MarketableItem cacheEntry {}; + cacheEntry.catalogId = id; + cacheEntry.itemSearchCategory = item->itemSearchCategory; + cacheEntry.maxEquipLevel = item->levelEquip; + cacheEntry.name = item->name; + cacheEntry.classJob = item->classJobUse; + + m_marketItemCache.push_back( std::move( cacheEntry ) ); + } + + Logger::info( "MarketMgr: Cached " + std::to_string( m_marketItemCache.size() ) + " marketable items" ); + return true; } -void Sapphire::World::Manager::MarketMgr::searchMarketboard( Entity::Player& player, - uint8_t itemSearchCategory, uint8_t maxEquipLevel, - uint8_t classJob ) +void Sapphire::World::Manager::MarketMgr::requestItemListings( Sapphire::Entity::Player& player, uint32_t catalogId, + uint32_t requestId ) { - + auto countPkt = makeZonePacket< Server::FFFXIVIpcMarketBoardItemListingCount >( player.getId() ); + countPkt->data().quantity = 1; + countPkt->data().itemCatalogId = catalogId; +} + + +void Sapphire::World::Manager::MarketMgr::searchMarketboard( Entity::Player& player, uint8_t itemSearchCategory, + uint8_t maxEquipLevel, uint8_t classJob, + const std::string_view& searchStr, uint32_t requestId, + uint32_t startIdx ) +{ + ItemSearchResultList resultList; + findItems( searchStr, itemSearchCategory, maxEquipLevel, classJob, resultList ); + + auto numResults = resultList.size(); + + if( startIdx > numResults ) + return; + + auto endIdx = std::min< size_t >( startIdx + 20, numResults ); + auto size = endIdx - startIdx; + + auto resultPkt = makeZonePacket< Server::FFXIVIpcMarketBoardSearchResult >( player.getId() ); + resultPkt->data().itemIndexStart = startIdx; + resultPkt->data().requestId = requestId; + + for( auto i = 0; i < resultList.size(); i++ ) + { + auto& item = resultList.at( startIdx + i ); + auto& data = resultPkt->data().items[ i ]; + + data.itemCatalogId = item.catalogId; + data.quantity = item.quantity; + data.demand = 69; + } + + if( size < 20 ) + resultPkt->data().itemIndexEnd = 0; + else + resultPkt->data().itemIndexEnd = startIdx + 20; + + player.queuePacket( resultPkt ); +} + +void Sapphire::World::Manager::MarketMgr::findItems( const std::string_view& searchStr, uint8_t itemSearchCat, + uint8_t maxEquipLevel, uint8_t classJob, + Sapphire::World::Manager::MarketMgr::ItemSearchResultList& resultList ) +{ + for( const auto& item : m_marketItemCache ) + { + if( item.itemSearchCategory != itemSearchCat ) + continue; + + if( maxEquipLevel > 0 && item.maxEquipLevel > maxEquipLevel ) + continue; + + if( classJob > 0 && item.classJob != classJob ) + continue; + + resultList.push_back( { item.catalogId, 1 } ); + } } \ No newline at end of file diff --git a/src/world/Manager/MarketMgr.h b/src/world/Manager/MarketMgr.h index 9c21c8ed..311c1e28 100644 --- a/src/world/Manager/MarketMgr.h +++ b/src/world/Manager/MarketMgr.h @@ -4,6 +4,8 @@ #include "ForwardsZone.h" #include "BaseManager.h" +#include + namespace Sapphire::World::Manager { class MarketMgr : public Manager::BaseManager @@ -13,7 +15,38 @@ namespace Sapphire::World::Manager bool init(); - void searchMarketboard( Entity::Player& player, uint8_t itemSearchCategory, uint8_t maxEquipLevel, uint8_t classJob ); + void searchMarketboard( Entity::Player& player, uint8_t itemSearchCategory, + uint8_t maxEquipLevel, uint8_t classJob, + const std::string_view& searchStr, uint32_t requestId, + uint32_t startIdx ); + + void requestItemListings( Entity::Player& player, uint32_t catalogId, uint32_t requestId ); + + private: + struct ItemSearchResult + { + uint32_t catalogId; + uint16_t quantity; + }; + + struct MarketableItem + { + uint32_t catalogId; + uint8_t itemSearchCategory; + uint8_t maxEquipLevel; + uint8_t classJob; + std::string name; + }; + + using ItemSearchResultList = std::vector< ItemSearchResult >; + using MarketableItemCacheList = std::vector< MarketableItem >; + + MarketableItemCacheList m_marketItemCache; + + + + void findItems( const std::string_view& searchStr, uint8_t itemSearchCat, uint8_t maxEquipLevel, uint8_t classJob, + ItemSearchResultList& resultList ); }; } diff --git a/src/world/Network/GameConnection.cpp b/src/world/Network/GameConnection.cpp index 8761647a..de524b87 100644 --- a/src/world/Network/GameConnection.cpp +++ b/src/world/Network/GameConnection.cpp @@ -123,6 +123,10 @@ Sapphire::Network::GameConnection::GameConnection( Sapphire::Network::HivePtr pH setZoneHandler( ClientZoneIpcType::PerformNoteHandler, "PerformNoteHandler", &GameConnection::performNoteHandler ); + setZoneHandler( ClientZoneIpcType::MarketBoardSearch, "MarketBoardSearch", &GameConnection::marketBoardSearch ); + setZoneHandler( ClientZoneIpcType::MarketBoardRequestItemInformation, "MarketBoardRequestItemInformation", + &GameConnection::marketBoardRequestItemInfo ); + setChatHandler( ClientChatIpcType::TellReq, "TellReq", &GameConnection::tellHandler ); } diff --git a/src/world/Network/GameConnection.h b/src/world/Network/GameConnection.h index c4984267..65901843 100644 --- a/src/world/Network/GameConnection.h +++ b/src/world/Network/GameConnection.h @@ -176,7 +176,9 @@ namespace Sapphire::Network DECLARE_HANDLER( reqMoveHousingItem ); - DECLARE_HANDLER( searchMarketboard ); + DECLARE_HANDLER( marketBoardSearch ); + + DECLARE_HANDLER( marketBoardRequestItemInfo ); }; diff --git a/src/world/Network/Handlers/PacketHandlers.cpp b/src/world/Network/Handlers/PacketHandlers.cpp index 580b0629..e08a566e 100644 --- a/src/world/Network/Handlers/PacketHandlers.cpp +++ b/src/world/Network/Handlers/PacketHandlers.cpp @@ -755,14 +755,26 @@ void Sapphire::Network::GameConnection::reqMoveHousingItem( FrameworkPtr pFw, } -void Sapphire::Network::GameConnection::searchMarketboard( FrameworkPtr pFw, - const Sapphire::Network::Packets::FFXIVARR_PACKET_RAW& inPacket, +void Sapphire::Network::GameConnection::marketBoardSearch( FrameworkPtr pFw, + const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { auto marketMgr = pFw->get< MarketMgr >(); - const auto packet = ZoneChannelPacket< Client::FFXIVIpcSearchMarketboard >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcMarketBoardSearch >( inPacket ); const auto& data = packet.data(); - marketMgr->searchMarketboard( player, data.itemSearchCategory, data.maxEquipLevel, data.classJobId ); + std::string_view searchStr( data.searchStr ); + + marketMgr->searchMarketboard( player, data.itemSearchCategory, data.maxEquipLevel, data.classJobId, data.searchStr, + data.requestId, data.startIdx ); +} + +void Sapphire::Network::GameConnection::marketBoardRequestItemInfo( FrameworkPtr pFw, + const Packets::FFXIVARR_PACKET_RAW& inPacket, + Entity::Player& player ) +{ + const auto packet = ZoneChannelPacket< Client::FFXIVIpcMarketBoardRequestItemInformation >( inPacket ); + + auto marketMgr = pFw->get< MarketMgr >(); } \ No newline at end of file From 717acba9cb3d16715cd58ba121ff3c3680024535 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Tue, 1 Jan 2019 14:19:44 +1100 Subject: [PATCH 82/86] fix oob error on market board result lists and correctly sort the items --- src/common/Network/PacketDef/Ipcs.h | 2 +- src/common/Network/PacketDef/Zone/ClientZoneDef.h | 4 ++-- src/world/Manager/MarketMgr.cpp | 10 +++++++++- src/world/Manager/MarketMgr.h | 1 + src/world/Network/GameConnection.cpp | 2 +- src/world/Network/Handlers/PacketHandlers.cpp | 2 +- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index c1875da3..bdfc08fb 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -264,7 +264,7 @@ namespace Sapphire::Network::Packets LinkshellListHandler = 0x00F4, // updated 4.3 - MarketBoardRequestItemInformation = 0x00FE, // updated 4.4 + MarketBoardRequestItemListingInfo = 0x00FE, // updated 4.4 MarketBoardRequestItemListings = 0x00FF, // updated 4.4 MarketBoardSearch = 0x0103, // updated 4.4 diff --git a/src/common/Network/PacketDef/Zone/ClientZoneDef.h b/src/common/Network/PacketDef/Zone/ClientZoneDef.h index e312d790..f4a057ad 100644 --- a/src/common/Network/PacketDef/Zone/ClientZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ClientZoneDef.h @@ -284,8 +284,8 @@ struct FFXIVIpcMarketBoardSearch : /* 0032 */ uint16_t unk4[43]; }; -struct FFXIVIpcMarketBoardRequestItemInformation : - FFXIVIpcBasePacket< MarketBoardRequestItemInformation > +struct FFXIVIpcMarketBoardRequestItemListingInfo : + FFXIVIpcBasePacket< MarketBoardRequestItemListingInfo > { /* 0000 */ uint32_t catalogId; /* 0000 */ uint32_t requestId; diff --git a/src/world/Manager/MarketMgr.cpp b/src/world/Manager/MarketMgr.cpp index b850f1bc..e448ba16 100644 --- a/src/world/Manager/MarketMgr.cpp +++ b/src/world/Manager/MarketMgr.cpp @@ -10,6 +10,8 @@ #include "Actor/Player.h" +#include + using namespace Sapphire::Network::Packets; Sapphire::World::Manager::MarketMgr::MarketMgr( Sapphire::FrameworkPtr pFw ) : @@ -41,10 +43,16 @@ bool Sapphire::World::Manager::MarketMgr::init() cacheEntry.maxEquipLevel = item->levelEquip; cacheEntry.name = item->name; cacheEntry.classJob = item->classJobUse; + cacheEntry.itemLevel = item->levelItem; m_marketItemCache.push_back( std::move( cacheEntry ) ); } + std::sort( m_marketItemCache.begin(), m_marketItemCache.end(), []( const MarketableItem& a, const MarketableItem& b ) + { + return a.itemLevel > b.itemLevel; + } ); + Logger::info( "MarketMgr: Cached " + std::to_string( m_marketItemCache.size() ) + " marketable items" ); return true; @@ -79,7 +87,7 @@ void Sapphire::World::Manager::MarketMgr::searchMarketboard( Entity::Player& pla resultPkt->data().itemIndexStart = startIdx; resultPkt->data().requestId = requestId; - for( auto i = 0; i < resultList.size(); i++ ) + for( auto i = 0; i < size; i++ ) { auto& item = resultList.at( startIdx + i ); auto& data = resultPkt->data().items[ i ]; diff --git a/src/world/Manager/MarketMgr.h b/src/world/Manager/MarketMgr.h index 311c1e28..b50462a6 100644 --- a/src/world/Manager/MarketMgr.h +++ b/src/world/Manager/MarketMgr.h @@ -34,6 +34,7 @@ namespace Sapphire::World::Manager uint32_t catalogId; uint8_t itemSearchCategory; uint8_t maxEquipLevel; + uint16_t itemLevel; uint8_t classJob; std::string name; }; diff --git a/src/world/Network/GameConnection.cpp b/src/world/Network/GameConnection.cpp index de524b87..bb2f6697 100644 --- a/src/world/Network/GameConnection.cpp +++ b/src/world/Network/GameConnection.cpp @@ -124,7 +124,7 @@ Sapphire::Network::GameConnection::GameConnection( Sapphire::Network::HivePtr pH setZoneHandler( ClientZoneIpcType::PerformNoteHandler, "PerformNoteHandler", &GameConnection::performNoteHandler ); setZoneHandler( ClientZoneIpcType::MarketBoardSearch, "MarketBoardSearch", &GameConnection::marketBoardSearch ); - setZoneHandler( ClientZoneIpcType::MarketBoardRequestItemInformation, "MarketBoardRequestItemInformation", + setZoneHandler( ClientZoneIpcType::MarketBoardRequestItemListingInfo, "MarketBoardRequestItemListingInfo", &GameConnection::marketBoardRequestItemInfo ); setChatHandler( ClientChatIpcType::TellReq, "TellReq", &GameConnection::tellHandler ); diff --git a/src/world/Network/Handlers/PacketHandlers.cpp b/src/world/Network/Handlers/PacketHandlers.cpp index e08a566e..aa07a1d5 100644 --- a/src/world/Network/Handlers/PacketHandlers.cpp +++ b/src/world/Network/Handlers/PacketHandlers.cpp @@ -774,7 +774,7 @@ void Sapphire::Network::GameConnection::marketBoardRequestItemInfo( FrameworkPtr const Packets::FFXIVARR_PACKET_RAW& inPacket, Entity::Player& player ) { - const auto packet = ZoneChannelPacket< Client::FFXIVIpcMarketBoardRequestItemInformation >( inPacket ); + const auto packet = ZoneChannelPacket< Client::FFXIVIpcMarketBoardRequestItemListingInfo >( inPacket ); auto marketMgr = pFw->get< MarketMgr >(); } \ No newline at end of file From cd19435876c87fbdcc1e00057b5faeb39ca1d03a Mon Sep 17 00:00:00 2001 From: NotAdam Date: Tue, 1 Jan 2019 17:29:06 +1100 Subject: [PATCH 83/86] somewhat working marketboard implementation --- .../Network/PacketDef/Zone/ServerZoneDef.h | 10 +++--- src/world/Manager/MarketMgr.cpp | 36 +++++++++++++++++-- src/world/Manager/MarketMgr.h | 4 ++- src/world/Network/GameConnection.cpp | 2 ++ src/world/Network/GameConnection.h | 2 ++ src/world/Network/Handlers/PacketHandlers.cpp | 13 +++++++ 6 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 2c5a8d8e..18618ab9 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -1860,11 +1860,11 @@ struct FFXIVIpcMarketBoardSearchResult : struct FFFXIVIpcMarketBoardItemListingCount : FFXIVIpcBasePacket< MarketBoardItemListingCount > { - uint32_t itemCatalogId; - uint32_t unknown1; // does some shit if nonzero - uint16_t unknown2; - uint16_t quantity; // high/low u8s read separately? - uint32_t padding3; + uint32_t itemCatalogId; + uint32_t unknown1; // does some shit if nonzero + uint16_t requestId; + uint16_t quantity; // high/low u8s read separately? + uint32_t unknown3; }; struct FFXIVIpcMarketBoardItemListingHistory : diff --git a/src/world/Manager/MarketMgr.cpp b/src/world/Manager/MarketMgr.cpp index e448ba16..e1a6d3bd 100644 --- a/src/world/Manager/MarketMgr.cpp +++ b/src/world/Manager/MarketMgr.cpp @@ -58,12 +58,37 @@ bool Sapphire::World::Manager::MarketMgr::init() return true; } -void Sapphire::World::Manager::MarketMgr::requestItemListings( Sapphire::Entity::Player& player, uint32_t catalogId, - uint32_t requestId ) +void Sapphire::World::Manager::MarketMgr::requestItemListingInfo( Sapphire::Entity::Player& player, uint32_t catalogId, + uint32_t requestId ) { auto countPkt = makeZonePacket< Server::FFFXIVIpcMarketBoardItemListingCount >( player.getId() ); - countPkt->data().quantity = 1; + countPkt->data().quantity = 1 << 8; countPkt->data().itemCatalogId = catalogId; + countPkt->data().requestId = requestId; + + player.queuePacket( countPkt ); + + auto historyPkt = makeZonePacket< Server::FFXIVIpcMarketBoardItemListingHistory >( player.getId() ); + historyPkt->data().itemCatalogId = catalogId; + historyPkt->data().itemCatalogId2 = catalogId; + + memset( &historyPkt->data().listing, 0x0, sizeof( Server::FFXIVIpcMarketBoardItemListingHistory::MarketListing ) * 20 ); + + std::string name = "fix game"; + + for( int i = 0; i < 10; ++i ) + { + auto& listing = historyPkt->data().listing[ i ]; + + listing.itemCatalogId = catalogId; + listing.quantity = i; + listing.purchaseTime = time( nullptr ); + listing.salePrice = 500; + + strcpy( listing.sellerName, name.c_str() ); + } + + player.queuePacket( historyPkt ); } @@ -105,6 +130,11 @@ void Sapphire::World::Manager::MarketMgr::searchMarketboard( Entity::Player& pla player.queuePacket( resultPkt ); } +void Sapphire::World::Manager::MarketMgr::requestItemListings( Sapphire::Entity::Player& player, uint16_t catalogId ) +{ + +} + void Sapphire::World::Manager::MarketMgr::findItems( const std::string_view& searchStr, uint8_t itemSearchCat, uint8_t maxEquipLevel, uint8_t classJob, Sapphire::World::Manager::MarketMgr::ItemSearchResultList& resultList ) diff --git a/src/world/Manager/MarketMgr.h b/src/world/Manager/MarketMgr.h index b50462a6..328c9c12 100644 --- a/src/world/Manager/MarketMgr.h +++ b/src/world/Manager/MarketMgr.h @@ -20,7 +20,9 @@ namespace Sapphire::World::Manager const std::string_view& searchStr, uint32_t requestId, uint32_t startIdx ); - void requestItemListings( Entity::Player& player, uint32_t catalogId, uint32_t requestId ); + void requestItemListingInfo( Entity::Player& player, uint32_t catalogId, uint32_t requestId ); + + void requestItemListings( Entity::Player& player, uint16_t catalogId ); private: struct ItemSearchResult diff --git a/src/world/Network/GameConnection.cpp b/src/world/Network/GameConnection.cpp index bb2f6697..57e336f4 100644 --- a/src/world/Network/GameConnection.cpp +++ b/src/world/Network/GameConnection.cpp @@ -126,6 +126,8 @@ Sapphire::Network::GameConnection::GameConnection( Sapphire::Network::HivePtr pH setZoneHandler( ClientZoneIpcType::MarketBoardSearch, "MarketBoardSearch", &GameConnection::marketBoardSearch ); setZoneHandler( ClientZoneIpcType::MarketBoardRequestItemListingInfo, "MarketBoardRequestItemListingInfo", &GameConnection::marketBoardRequestItemInfo ); + setZoneHandler( ClientZoneIpcType::MarketBoardRequestItemListings, "MarketBoardRequestItemListings", + &GameConnection::marketBoardRequestItemListings ); setChatHandler( ClientChatIpcType::TellReq, "TellReq", &GameConnection::tellHandler ); diff --git a/src/world/Network/GameConnection.h b/src/world/Network/GameConnection.h index 65901843..72c800b2 100644 --- a/src/world/Network/GameConnection.h +++ b/src/world/Network/GameConnection.h @@ -180,6 +180,8 @@ namespace Sapphire::Network DECLARE_HANDLER( marketBoardRequestItemInfo ); + DECLARE_HANDLER( marketBoardRequestItemListings ); + }; } diff --git a/src/world/Network/Handlers/PacketHandlers.cpp b/src/world/Network/Handlers/PacketHandlers.cpp index aa07a1d5..d737bf8a 100644 --- a/src/world/Network/Handlers/PacketHandlers.cpp +++ b/src/world/Network/Handlers/PacketHandlers.cpp @@ -777,4 +777,17 @@ void Sapphire::Network::GameConnection::marketBoardRequestItemInfo( FrameworkPtr const auto packet = ZoneChannelPacket< Client::FFXIVIpcMarketBoardRequestItemListingInfo >( inPacket ); auto marketMgr = pFw->get< MarketMgr >(); + + marketMgr->requestItemListingInfo( player, packet.data().catalogId, packet.data().requestId ); +} + +void Sapphire::Network::GameConnection::marketBoardRequestItemListings( FrameworkPtr pFw, + const Packets::FFXIVARR_PACKET_RAW& inPacket, + Entity::Player& player ) +{ + const auto packet = ZoneChannelPacket< Client::FFXIVIpcMarketBoardRequestItemListings >( inPacket ); + + auto marketMgr = pFw->get< MarketMgr >(); + + marketMgr->requestItemListings( player, packet.data().itemCatalogId ); } \ No newline at end of file From 4673a8122e8351c0b8729353494b5bd4e0f4d1d1 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Tue, 1 Jan 2019 23:37:32 +1100 Subject: [PATCH 84/86] fix structs, disable market cache gen --- src/common/Network/PacketDef/Ipcs.h | 2 +- .../Network/PacketDef/Zone/ServerZoneDef.h | 10 +-- src/world/Manager/MarketMgr.cpp | 86 ++++++++++--------- 3 files changed, 51 insertions(+), 47 deletions(-) diff --git a/src/common/Network/PacketDef/Ipcs.h b/src/common/Network/PacketDef/Ipcs.h index bdfc08fb..bca4b286 100644 --- a/src/common/Network/PacketDef/Ipcs.h +++ b/src/common/Network/PacketDef/Ipcs.h @@ -176,7 +176,7 @@ namespace Sapphire::Network::Packets DirectorVars = 0x01E1, // updated 4.4 - CFAvailableContents = 0x01FD, // updated 4.2 + CFAvailableContents = 0xF1FD, // updated 4.2 WeatherChange = 0x01FC, // updated 4.4 PlayerTitleList = 0x01FD, // updated 4.4 diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 18618ab9..e1f3980e 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -1876,14 +1876,14 @@ struct FFXIVIpcMarketBoardItemListingHistory : struct MarketListing { uint32_t salePrice; - time_t purchaseTime; + uint32_t purchaseTime; uint32_t quantity; - uint16_t unknown1; - uint8_t unknown2; + uint8_t isHq; + uint8_t padding; + uint8_t onMannequin; - char sellerName[32]; + char buyerName[33]; - uint8_t unknown3; uint32_t itemCatalogId; } listing[20]; }; diff --git a/src/world/Manager/MarketMgr.cpp b/src/world/Manager/MarketMgr.cpp index e1a6d3bd..d18d28e1 100644 --- a/src/world/Manager/MarketMgr.cpp +++ b/src/world/Manager/MarketMgr.cpp @@ -22,38 +22,41 @@ Sapphire::World::Manager::MarketMgr::MarketMgr( Sapphire::FrameworkPtr pFw ) : bool Sapphire::World::Manager::MarketMgr::init() { - Logger::info( "MarketMgr: warming up marketable item cache..." ); - - // build item cache - auto exdData = framework()->get< Sapphire::Data::ExdDataGenerated >(); - auto idList = exdData->getItemIdList(); - - for( auto id : idList ) - { - auto item = exdData->get< Sapphire::Data::Item >( id ); - if( !item ) - continue; - - if( item->isUntradable ) - continue; - - MarketableItem cacheEntry {}; - cacheEntry.catalogId = id; - cacheEntry.itemSearchCategory = item->itemSearchCategory; - cacheEntry.maxEquipLevel = item->levelEquip; - cacheEntry.name = item->name; - cacheEntry.classJob = item->classJobUse; - cacheEntry.itemLevel = item->levelItem; - - m_marketItemCache.push_back( std::move( cacheEntry ) ); - } - - std::sort( m_marketItemCache.begin(), m_marketItemCache.end(), []( const MarketableItem& a, const MarketableItem& b ) - { - return a.itemLevel > b.itemLevel; - } ); - - Logger::info( "MarketMgr: Cached " + std::to_string( m_marketItemCache.size() ) + " marketable items" ); +// Logger::info( "MarketMgr: warming up marketable item cache..." ); +// +// // build item cache +// auto exdData = framework()->get< Sapphire::Data::ExdDataGenerated >(); +// auto idList = exdData->getItemIdList(); +// +// for( auto id : idList ) +// { +// if( id > 10000 ) +// break; +// +// auto item = exdData->get< Sapphire::Data::Item >( id ); +// if( !item ) +// continue; +// +// if( item->isUntradable ) +// continue; +// +// MarketableItem cacheEntry {}; +// cacheEntry.catalogId = id; +// cacheEntry.itemSearchCategory = item->itemSearchCategory; +// cacheEntry.maxEquipLevel = item->levelEquip; +// cacheEntry.name = item->name; +// cacheEntry.classJob = item->classJobUse; +// cacheEntry.itemLevel = item->levelItem; +// +// m_marketItemCache.push_back( std::move( cacheEntry ) ); +// } +// +// std::sort( m_marketItemCache.begin(), m_marketItemCache.end(), []( const MarketableItem& a, const MarketableItem& b ) +// { +// return a.itemLevel > b.itemLevel; +// } ); +// +// Logger::info( "MarketMgr: Cached " + std::to_string( m_marketItemCache.size() ) + " marketable items" ); return true; } @@ -72,20 +75,21 @@ void Sapphire::World::Manager::MarketMgr::requestItemListingInfo( Sapphire::Enti historyPkt->data().itemCatalogId = catalogId; historyPkt->data().itemCatalogId2 = catalogId; - memset( &historyPkt->data().listing, 0x0, sizeof( Server::FFXIVIpcMarketBoardItemListingHistory::MarketListing ) * 20 ); + std::string name = "fix game pls se :((("; - std::string name = "fix game"; - - for( int i = 0; i < 10; ++i ) + for( int i = 0; i < 10; i++ ) { auto& listing = historyPkt->data().listing[ i ]; listing.itemCatalogId = catalogId; - listing.quantity = i; + listing.quantity = i + 1; listing.purchaseTime = time( nullptr ); - listing.salePrice = 500; + listing.salePrice = 69420420; + listing.isHq = 1; + listing.onMannequin = 1; - strcpy( listing.sellerName, name.c_str() ); + + strcpy( listing.buyerName, name.c_str() ); } player.queuePacket( historyPkt ); @@ -119,7 +123,7 @@ void Sapphire::World::Manager::MarketMgr::searchMarketboard( Entity::Player& pla data.itemCatalogId = item.catalogId; data.quantity = item.quantity; - data.demand = 69; + data.demand = 420; } if( size < 20 ) @@ -132,7 +136,7 @@ void Sapphire::World::Manager::MarketMgr::searchMarketboard( Entity::Player& pla void Sapphire::World::Manager::MarketMgr::requestItemListings( Sapphire::Entity::Player& player, uint16_t catalogId ) { - + } void Sapphire::World::Manager::MarketMgr::findItems( const std::string_view& searchStr, uint8_t itemSearchCat, From 551efcfe9a80367a873216c98c78ffe60eda2ed7 Mon Sep 17 00:00:00 2001 From: mordred Date: Wed, 2 Jan 2019 10:28:41 +0100 Subject: [PATCH 85/86] Slight cmake cleanup --- CMakeLists.txt | 16 ++++++++++++---- src/scripts/CMakeLists.txt | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2a23030..21fdc195 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,6 @@ set( CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin ) set( EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin ) set( LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin ) -set( EXECUTABLE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin ) set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} @@ -29,23 +28,32 @@ configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/src/common/Version.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/common/Version.cpp" @ONLY ) ############################## -# Mysql # +# Mysql # ############################## find_package( MySQL ) -########################################################################## +############################## +# Dependencies # +############################## add_subdirectory( "deps/zlib" ) add_subdirectory( "deps/MySQL" ) add_subdirectory( "deps/datReader" ) add_subdirectory( "deps/mysqlConnector" ) add_subdirectory( "src/common" ) + +############################## +# Main Sapphire Components # +############################## add_subdirectory( "src/api" ) add_subdirectory( "src/lobby" ) add_subdirectory( "src/world" ) add_subdirectory( "src/dbm" ) add_subdirectory( "src/scripts" ) +############################## +# Tools # +############################## add_subdirectory( "src/tools/exd_common_gen" ) add_subdirectory( "src/tools/exd_struct_gen" ) add_subdirectory( "src/tools/exd_struct_test" ) @@ -53,4 +61,4 @@ add_subdirectory( "src/tools/quest_parser" ) add_subdirectory( "src/tools/discovery_parser" ) add_subdirectory( "src/tools/mob_parse" ) add_subdirectory( "src/tools/pcb_reader" ) -add_subdirectory( "src/tools/event_object_parser" ) \ No newline at end of file +add_subdirectory( "src/tools/event_object_parser" ) diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt index 710f957d..a6949a5c 100644 --- a/src/scripts/CMakeLists.txt +++ b/src/scripts/CMakeLists.txt @@ -3,9 +3,9 @@ project(Script) file(GLOB SCRIPT_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -message("exec: ${EXECUTABLE_OUTPUT_DIRECTORY}") +message("exec: ${EXECUTABLE_OUTPUT_PATH}") -set(SCRIPT_LIB_DIR "${EXECUTABLE_OUTPUT_DIRECTORY}/compiledscripts/" ) +set(SCRIPT_LIB_DIR "${EXECUTABLE_OUTPUT_PATH}/compiledscripts/" ) set(EXECUTABLE_OUTPUT_PATH "${SCRIPT_LIB_DIR}") set(LIBRARY_OUTPUT_PATH "${SCRIPT_LIB_DIR}") set(RUNTIME_OUTPUT_DIRECTORY "${SCRIPT_LIB_DIR}") From 3ffcf4e1fa45f2139fdd1644b779edc5303e0990 Mon Sep 17 00:00:00 2001 From: mordred Date: Wed, 2 Jan 2019 11:23:39 +0100 Subject: [PATCH 86/86] Further cmake cleanup --- CMakeLists.txt | 5 ++--- src/api/CMakeLists.txt | 6 ------ src/common/CMakeLists.txt | 25 ++++++++----------------- src/lobby/CMakeLists.txt | 10 +--------- src/world/CMakeLists.txt | 7 +------ 5 files changed, 12 insertions(+), 41 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21fdc195..bdbfa716 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,17 +39,16 @@ add_subdirectory( "deps/zlib" ) add_subdirectory( "deps/MySQL" ) add_subdirectory( "deps/datReader" ) add_subdirectory( "deps/mysqlConnector" ) -add_subdirectory( "src/common" ) - ############################## # Main Sapphire Components # ############################## +add_subdirectory( "src/common" ) add_subdirectory( "src/api" ) add_subdirectory( "src/lobby" ) add_subdirectory( "src/world" ) -add_subdirectory( "src/dbm" ) add_subdirectory( "src/scripts" ) +add_subdirectory( "src/dbm" ) ############################## # Tools # diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt index 83279c18..1b9ca308 100644 --- a/src/api/CMakeLists.txt +++ b/src/api/CMakeLists.txt @@ -8,9 +8,3 @@ file( GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*" ) add_executable( api ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) target_link_libraries( api common ) -if( UNIX ) - target_link_libraries( api mysqlclient stdc++fs ) - -else() - target_link_libraries( api mysql ) -endif() diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 00f863c9..a774e3cc 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -17,25 +17,16 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) add_library( common ${UTILS_PUBLIC_INCLUDE_FILES} ${UTILS_SOURCE_FILES} ) -set_target_properties( common PROPERTIES - RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" - RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/" -) - -target_link_libraries( common PUBLIC xivdat ) - -target_link_libraries( common PUBLIC mysqlConnector ) +target_link_libraries( common + PUBLIC + xivdat + mysqlConnector + mysql ) if( UNIX ) - - target_link_libraries( common PUBLIC mysqlclient ) - target_link_libraries( common PUBLIC pthread ) - -else() - target_link_libraries( common + target_link_libraries( common PUBLIC - mysql ) + pthread + stdc++fs ) endif() target_include_directories( common diff --git a/src/lobby/CMakeLists.txt b/src/lobby/CMakeLists.txt index ce70e468..cba809cf 100644 --- a/src/lobby/CMakeLists.txt +++ b/src/lobby/CMakeLists.txt @@ -10,13 +10,5 @@ add_executable( lobby ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES} ) target_link_libraries( lobby PRIVATE - common - mysql ) -if( UNIX ) - target_link_libraries( lobby - PRIVATE - stdc++fs ) - -endif() - + common ) #cotire( lobby ) diff --git a/src/world/CMakeLists.txt b/src/world/CMakeLists.txt index 3c223058..7d25aae6 100644 --- a/src/world/CMakeLists.txt +++ b/src/world/CMakeLists.txt @@ -26,9 +26,7 @@ add_executable( world ${SERVER_SOURCE_FILES} ) set_target_properties( world PROPERTIES ENABLE_EXPORTS ON - WINDOWS_EXPORT_ALL_SYMBOLS ON -) - + WINDOWS_EXPORT_ALL_SYMBOLS ON ) target_link_libraries( world PUBLIC @@ -40,7 +38,4 @@ target_include_directories( world if( UNIX ) cotire( world ) - target_link_libraries( world PUBLIC stdc++fs ) -else() - target_link_libraries( world PUBLIC mysql ) endif()