本文整理汇总了C++中Console::SendEmoteMessageRaw方法的典型用法代码示例。如果您正苦于以下问题:C++ Console::SendEmoteMessageRaw方法的具体用法?C++ Console::SendEmoteMessageRaw怎么用?C++ Console::SendEmoteMessageRaw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Console
的用法示例。
在下文中一共展示了Console::SendEmoteMessageRaw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendEmoteMessageRaw
void ZSList::SendEmoteMessageRaw(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message) {
if (!message)
return;
ServerPacket* pack = new ServerPacket;
pack->opcode = ServerOP_EmoteMessage;
pack->size = sizeof(ServerEmoteMessage_Struct)+strlen(message)+1;
pack->pBuffer = new uchar[pack->size];
memset(pack->pBuffer, 0, pack->size);
ServerEmoteMessage_Struct* sem = (ServerEmoteMessage_Struct*) pack->pBuffer;
if (to) {
if (to[0] == '*') {
Console* con = console_list.FindByAccountName(&to[1]);
if (con)
con->SendEmoteMessageRaw(to, to_guilddbid, to_minstatus, type, message);
delete pack;
return;
}
strcpy((char *) sem->to, to);
}
else {
sem->to[0] = 0;
}
sem->guilddbid = to_guilddbid;
sem->minstatus = to_minstatus;
sem->type = type;
strcpy(&sem->message[0], message);
char tempto[64]={0};
if(to)
strn0cpy(tempto,to,64);
pack->Deflate();
if (tempto[0] == 0) {
SendPacket(pack);
if (to_guilddbid == 0)
console_list.SendEmoteMessageRaw(type, message);
}
else {
ZoneServer* zs = FindByName(to);
if (zs != 0)
zs->SendPacket(pack);
else
SendPacket(pack);
}
delete pack;
}