mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-08 11:47:45 +00:00
shouts now have correct behaviour
This commit is contained in:
parent
3c890148f2
commit
afd439c64f
3 changed files with 16 additions and 1 deletions
|
@ -516,7 +516,7 @@ void Core::Network::GameConnection::chatHandler( const Packets::GamePacket& inPa
|
||||||
}
|
}
|
||||||
case ChatType::Shout:
|
case ChatType::Shout:
|
||||||
{
|
{
|
||||||
player.getCurrentZone()->queueOutPacketForRange( player, 6000, chatPacket );
|
player.getCurrentZone()->queueOutPacket( chatPacket );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -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()
|
uint32_t Zone::getTerritoryId()
|
||||||
{
|
{
|
||||||
return m_territoryId;
|
return m_territoryId;
|
||||||
|
|
|
@ -86,6 +86,8 @@ public:
|
||||||
|
|
||||||
void queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, Network::Packets::GamePacketPtr pPacketEntry );
|
void queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, Network::Packets::GamePacketPtr pPacketEntry );
|
||||||
|
|
||||||
|
void queueOutPacket( Network::Packets::GamePacketPtr pPacketEntry );
|
||||||
|
|
||||||
virtual uint32_t getTerritoryId();
|
virtual uint32_t getTerritoryId();
|
||||||
|
|
||||||
Common::RegionType getType() const;
|
Common::RegionType getType() const;
|
||||||
|
|
Loading…
Add table
Reference in a new issue