本文整理汇总了C++中ZSList::SendEmoteMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ ZSList::SendEmoteMessage方法的具体用法?C++ ZSList::SendEmoteMessage怎么用?C++ ZSList::SendEmoteMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZSList
的用法示例。
在下文中一共展示了ZSList::SendEmoteMessage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendClientVersionSummary
void ClientList::SendClientVersionSummary(const char *Name)
{
uint32 Client62Count = 0;
uint32 ClientTitaniumCount = 0;
uint32 ClientSoFCount = 0;
uint32 ClientSoDCount = 0;
uint32 ClientUnderfootCount = 0;
uint32 ClientRoFCount = 0;
LinkedListIterator<ClientListEntry*> Iterator(clientlist);
Iterator.Reset();
while(Iterator.MoreElements())
{
ClientListEntry* CLE = Iterator.GetData();
if(CLE && CLE->zone())
{
switch(CLE->GetClientVersion())
{
case 1:
{
++Client62Count;
break;
}
case 2:
{
++ClientTitaniumCount;
break;
}
case 3:
{
++ClientSoFCount;
break;
}
case 4:
{
++ClientSoDCount;
break;
}
case 5:
{
++ClientUnderfootCount;
break;
}
case 6:
{
++ClientRoFCount;
break;
}
default:
break;
}
}
Iterator.Advance();
}
zoneserver_list.SendEmoteMessage(Name, 0, 0, 13, "There are %i 6.2, %i Titanium, %i SoF, %i SoD, %i UF, %i RoF clients currently connected.",
Client62Count, ClientTitaniumCount, ClientSoFCount, ClientSoDCount, ClientUnderfootCount, ClientRoFCount);
}
示例2: HandleEnterWorldPacket
//.........这里部分代码省略.........
return true;
}
}
if (zoneID == 0 || !database.GetZoneName(zoneID)) {
// This is to save people in an invalid zone, once it's removed from the DB
database.MoveCharacterToZone(charid, "arena");
clog(WORLD__CLIENT_ERR, "Zone not found in database zone_id=%i, moveing char to arena character:%s", zoneID, char_name);
}
if(instanceID > 0)
{
if(!database.VerifyInstanceAlive(instanceID, GetCharID()))
{
zoneID = database.MoveCharacterToBind(charid);
instanceID = 0;
}
else
{
if(!database.VerifyZoneInstance(zoneID, instanceID))
{
zoneID = database.MoveCharacterToBind(charid);
instanceID = 0;
}
}
}
if(!pZoning) {
database.SetGroupID(char_name, 0, charid);
database.SetFirstLogon(charid, 1);
if (RuleB(World, AnnounceJoinQuits) == true) //this is having an issue, its not taking a true false swap, only takes default.
{
zoneserver_list.SendEmoteMessage(0, 0, 0, 15, "%s is logging on!", GetCharName());
clog(WORLD__CLIENT_ERR, "Character is logging on: %s", GetCharName());
}
}
else{
uint32 groupid=database.GetGroupID(char_name);
if(groupid>0){
char* leader=0;
char leaderbuf[64]={0};
if((leader=database.GetGroupLeaderForLogin(char_name,leaderbuf)) && strlen(leader)>1){
EQApplicationPacket* outapp3 = new EQApplicationPacket(OP_GroupUpdate,sizeof(GroupJoin_Struct));
GroupJoin_Struct* gj=(GroupJoin_Struct*)outapp3->pBuffer;
gj->action=8;
strcpy(gj->yourname,char_name);
strcpy(gj->membername,leader);
QueuePacket(outapp3);
safe_delete(outapp3);
}
}
}
outapp = new EQApplicationPacket(OP_MOTD);
char tmp[500] = {0};
if (database.GetVariable("MOTD", tmp, 500)) {
outapp->size = strlen(tmp)+1;
outapp->pBuffer = new uchar[outapp->size];
memset(outapp->pBuffer,0,outapp->size);
strcpy((char*)outapp->pBuffer, tmp);
} else {
// Null Message of the Day. :)
outapp->size = 1;
outapp->pBuffer = new uchar[outapp->size];
示例3: SendMessage
void EQW::SendMessage(uint32 type, const char *msg) {
zoneserver_list.SendEmoteMessage(0, 0, 0, type, msg);
}
示例4: SendClientVersionSummary
void ClientList::SendClientVersionSummary(const char *Name)
{
uint32 ClientUnusedCount = 0;
uint32 ClientPCCount = 0;
uint32 ClientIntelCount = 0;
uint32 ClientPPCCount = 0;
uint32 ClientEvolutionCount = 0;
LinkedListIterator<ClientListEntry*> Iterator(clientlist);
Iterator.Reset();
while(Iterator.MoreElements())
{
ClientListEntry* CLE = Iterator.GetData();
if(CLE && CLE->zone())
{
switch(CLE->GetClientVersion())
{
case 1:
{
++ClientUnusedCount;
break;
}
case 2:
{
switch(CLE->GetMacClientVersion())
{
case 2:
{
++ClientPCCount;
break;
}
case 4:
{
++ClientIntelCount;
break;
}
case 8:
{
++ClientPPCCount;
break;
}
}
break;
}
case 3:
{
++ClientEvolutionCount;
break;
}
default:
break;
}
}
Iterator.Advance();
}
zoneserver_list.SendEmoteMessage(Name, 0, 0, 13, "There are %i Unused, %i PC, %i Intel, %i PPC, %i Evolution clients currently connected.",
ClientUnusedCount, ClientPCCount, ClientIntelCount, ClientPPCCount, ClientEvolutionCount);
}
示例5: Process
//.........这里部分代码省略.........
zoneserver_list.SendPacket(pack);
break;
}
case ServerOP_SpawnCondition: {
if(pack->size != sizeof(ServerSpawnCondition_Struct))
break;
//bounce the packet to the correct zone server, if its up
ServerSpawnCondition_Struct* ssc = (ServerSpawnCondition_Struct*)pack->pBuffer;
zoneserver_list.SendPacket(ssc->zoneID, ssc->instanceID, pack);
break;
}
case ServerOP_SpawnEvent: {
if(pack->size != sizeof(ServerSpawnEvent_Struct))
break;
//bounce the packet to the correct zone server, if its up
ServerSpawnEvent_Struct* sse = (ServerSpawnEvent_Struct*)pack->pBuffer;
zoneserver_list.SendPacket(sse->zoneID, 0, pack);
break;
}
case ServerOP_ChannelMessage: {
ServerChannelMessage_Struct* scm = (ServerChannelMessage_Struct*) pack->pBuffer;
if(scm->chan_num == 20)
{
UCSLink.SendMessage(scm->from, scm->message);
break;
}
if (scm->chan_num == 7 || scm->chan_num == 14) {
if (scm->deliverto[0] == '*') {
Console* con = 0;
con = console_list.FindByAccountName(&scm->deliverto[1]);
if (((!con) || (!con->SendChannelMessage(scm))) && (!scm->noreply))
zoneserver_list.SendEmoteMessage(scm->from, 0, 0, 0, "You told %s, '%s is not online at this time'", scm->to, scm->to);
break;
}
ClientListEntry* cle = client_list.FindCharacter(scm->deliverto);
if (cle == 0 || cle->Online() < CLE_Status_Zoning || (cle->TellsOff() && ((cle->Anon() == 1 && scm->fromadmin < cle->Admin()) || scm->fromadmin < 80))) {
if (!scm->noreply)
zoneserver_list.SendEmoteMessage(scm->from, 0, 0, 0, "You told %s, '%s is not online at this time'", scm->to, scm->to);
}
else if (cle->Online() == CLE_Status_Zoning) {
if (!scm->noreply) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
//MYSQL_ROW row; Trumpcard - commenting. Currently unused.
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
char *telldate=asctime(timeinfo);
if (database.RunQuery(query, MakeAnyLenString(&query, "SELECT name from character_ where name='%s'",scm->deliverto), errbuf, &result)) {
safe_delete(query);
if (result!=0) {
if (database.RunQuery(query, MakeAnyLenString(&query, "INSERT INTO tellque (Date,Receiver,Sender,Message) values('%s','%s','%s','%s')",telldate,scm->deliverto,scm->from,scm->message), errbuf, &result))
zoneserver_list.SendEmoteMessage(scm->from, 0, 0, 0, "Your message has been added to the %s's que.", scm->to);
else
zoneserver_list.SendEmoteMessage(scm->from, 0, 0, 0, "You told %s, '%s is not online at this time'", scm->to, scm->to);
safe_delete(query);
}
else
zoneserver_list.SendEmoteMessage(scm->from, 0, 0, 0, "You told %s, '%s is not online at this time'", scm->to, scm->to);
mysql_free_result(result);
}
else