Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
677 B
C++
29 lines
677 B
C++
#include "stdafx.h"
|
|
#include "Character.h"
|
|
#include <Creature/CreatureManager.h>
|
|
#include <Network/Dispatch/GameClient/GameClientDispatch.h>
|
|
|
|
#include <Network/Packet/ChatPacket.h>
|
|
#include <Network/Packet/PacketCommand.h>
|
|
#include <Network/Packet/PacketStruct/CharCommunityPacket.h>
|
|
|
|
#include <mmsystem.h>
|
|
|
|
|
|
bool CCharacter::CanShout() const
|
|
{
|
|
const long MAX_SHOUT_DELAY = 15000;
|
|
unsigned long dwCurrentTime = timeGetTime();
|
|
|
|
return (0 == m_dwLastShoutTime || MAX_SHOUT_DELAY < dwCurrentTime - m_dwLastShoutTime);
|
|
}
|
|
|
|
void CCharacter::Shouted()
|
|
{
|
|
m_dwLastShoutTime = timeGetTime();
|
|
|
|
if(0 == m_dwLastShoutTime)
|
|
{
|
|
++m_dwLastShoutTime;
|
|
}
|
|
} |