コード例 #1
0
ファイル: ChatProtocol.cpp プロジェクト: ChowZenki/dboserver
void ChatClient::SendChatSay(sUT_CHAT_MESSAGE_SAY* pData)
{
	GetCharInfo();
	sTU_CHAT_MESSAGE_SAY pSay;
	memset(&pSay, 0, sizeof(pSay));
	pSay.wOpCode = TU_CHAT_MESSAGE_SAY;
	pSay.hSubject = CharSerialID;
	memcpy(pSay.awchSenderCharName, charName, NTL_MAX_SIZE_CHAR_NAME_UNICODE);
	memcpy(pSay.awchMessage, pData->awchMessage, NTL_MAX_LENGTH_OF_CHAT_MESSAGE_UNICODE);
	pSay.wMessageLengthInUnicode = pData->wMessageLengthInUnicode;
	Logger::Log("%s says: %s\n", GameString(pSay.awchSenderCharName).c_str(), GameString(pSay.awchMessage).c_str());
	pServer->GetChatManager()->SendAll2(&pSay, sizeof(pSay),this);
}
コード例 #2
0
ファイル: ChatProtocol.cpp プロジェクト: ChowZenki/dboserver
//By Luiz45 Shouting the msg to everybody who is connected at channel
void ChatClient::SendChatShout(sUT_CHAT_MESSAGE_SHOUT* pData)
{
	GetCharInfo();
	sTU_CHAT_MESSAGE_SHOUT pShout;
	memset(&pShout, 0, sizeof(pShout));
	pShout.hSubject = CharSerialID;
	pShout.wOpCode = TU_CHAT_MESSAGE_SHOUT;
	pShout.wMessageLengthInUnicode = pData->wMessageLengthInUnicode;
	memcpy(pShout.awchSenderCharName, charName, NTL_MAX_SIZE_CHAR_NAME_UNICODE);
	memcpy(pShout.awchMessage, pData->awchMessage, NTL_MAX_LENGTH_OF_CHAT_MESSAGE_UNICODE);
	Logger::Log("%s Say to everybody in the chat: %s\n", GameString(pShout.awchSenderCharName).c_str(), GameString(pShout.awchMessage).c_str());
	pServer->GetChatManager()->SendAll(&pShout, sizeof(pShout));
}
コード例 #3
0
ファイル: StringManager.cpp プロジェクト: Tigole/rpg_engine
	bool mt_Load_Text(const XML_Element& text)
	{
		bool l_b_ret(false);
		std::string l_id, l_sentence;

		l_b_ret = text.mt_Get_Attribute("id", l_id);
		if (l_b_ret == true)
		{
			l_b_ret = text.mt_Get_Attribute("val", l_sentence);
		}
		if (l_b_ret == true)
		{
			m_target->mt_Add_Sentence(m_lang_id, l_id, GameString(l_sentence));
		}

		return l_b_ret;
	}