1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-08 03:37:45 +00:00

shouts now have correct behaviour

This commit is contained in:
Adam 2018-01-28 18:48:56 +11:00
parent 3c890148f2
commit afd439c64f
3 changed files with 16 additions and 1 deletions

View file

@ -516,7 +516,7 @@ void Core::Network::GameConnection::chatHandler( const Packets::GamePacket& inPa
}
case ChatType::Shout:
{
player.getCurrentZone()->queueOutPacketForRange( player, 6000, chatPacket );
player.getCurrentZone()->queueOutPacket( chatPacket );
break;
}
default:

View file

@ -362,6 +362,19 @@ void Zone::queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range,
}
}
void Zone::queueOutPacket( Network::Packets::GamePacketPtr pPacketEntry )
{
for( auto it = m_playerMap.begin(); it != m_playerMap.end(); ++it )
{
auto pSession = g_serverZone.getSession( ( *it ).second->getId() );
if( pSession )
{
pPacketEntry->setValAt< uint32_t >( 0x08, ( *it ).second->getId() );
pSession->getZoneConnection()->queueOutPacket( pPacketEntry );
}
}
}
uint32_t Zone::getTerritoryId()
{
return m_territoryId;

View file

@ -86,6 +86,8 @@ public:
void queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, Network::Packets::GamePacketPtr pPacketEntry );
void queueOutPacket( Network::Packets::GamePacketPtr pPacketEntry );
virtual uint32_t getTerritoryId();
Common::RegionType getType() const;