mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 15:47:46 +00:00
send greeting, icon and house name when a house has been built
This commit is contained in:
parent
ccc31353e6
commit
6be4d17723
1 changed files with 10 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include <Network/CommonActorControl.h>
|
#include <Network/CommonActorControl.h>
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
#include "Actor/Player.h"
|
#include "Actor/Player.h"
|
||||||
|
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
#include "Land.h"
|
#include "Land.h"
|
||||||
#include "Framework.h"
|
#include "Framework.h"
|
||||||
#include "ServerMgr.h"
|
#include "ServerMgr.h"
|
||||||
|
#include "House.h"
|
||||||
|
|
||||||
using namespace Core::Common;
|
using namespace Core::Common;
|
||||||
using namespace Core::Network;
|
using namespace Core::Network;
|
||||||
|
@ -97,7 +99,15 @@ void Core::HousingMgr::sendLandSignOwned( Entity::Player& player, uint8_t wardId
|
||||||
landInfoSignPacket->data().landIdent.wardNum = land->getWardNum();
|
landInfoSignPacket->data().landIdent.wardNum = land->getWardNum();
|
||||||
landInfoSignPacket->data().landIdent.worldId = 67;
|
landInfoSignPacket->data().landIdent.worldId = 67;
|
||||||
landInfoSignPacket->data().landIdent.territoryTypeId = land->getTerritoryTypeId();
|
landInfoSignPacket->data().landIdent.territoryTypeId = land->getTerritoryTypeId();
|
||||||
|
landInfoSignPacket->data().houseIconAdd = land->getSharing();
|
||||||
landInfoSignPacket->data().ownerId = player.getContentId(); // should be real owner contentId, not player.contentId()
|
landInfoSignPacket->data().ownerId = player.getContentId(); // should be real owner contentId, not player.contentId()
|
||||||
|
|
||||||
|
if( auto house = land->getHouse() )
|
||||||
|
{
|
||||||
|
std::strcpy( landInfoSignPacket->data().estateName, house->getHouseName().c_str() );
|
||||||
|
std::strcpy( landInfoSignPacket->data().estateGreeting, house->getHouseGreeting().c_str() );
|
||||||
|
}
|
||||||
|
|
||||||
memcpy( &landInfoSignPacket->data().ownerName, playerName.c_str(), playerName.size() );
|
memcpy( &landInfoSignPacket->data().ownerName, playerName.c_str(), playerName.size() );
|
||||||
|
|
||||||
player.queuePacket( landInfoSignPacket );
|
player.queuePacket( landInfoSignPacket );
|
||||||
|
|
Loading…
Add table
Reference in a new issue