亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? handle_anongame.c

?? 打魔獸戰網的都知道他是什么
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* * Copyright (C) 2004 CreepLord (creeplord@pvpgn.org) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */#include "common/setup_before.h"#ifdef HAVE_STRING_H# include <string.h>#else# ifdef HAVE_STRINGS_H#  include <strings.h># endif#endif#include <errno.h>#ifdef STDC_HEADERS# include <stdlib.h>#else# ifdef HAVE_MALLOC_H#  include <malloc.h># endif#endif#include "common/bn_type.h"#include "common/eventlog.h"#include "common/packet.h"#include "common/queue.h"#include "common/tag.h"#include "common/list.h"#include "common/util.h"#include "common/xalloc.h"#include "common/bnettime.h"#include "connection.h"#include "team.h"#include "account.h"#include "account_wrap.h"#include "channel.h"#include "anongame.h"#include "anongame_infos.h"#include "anongame_maplists.h"#include "handle_anongame.h"#include "tournament.h"#include "server.h"#include "clan.h"#include "common/setup_after.h"/* option - handling function *//* 0x00 */ /* PG style search - handle_anongame_search() in anongame.c */ /* 0x01 */ /* server side packet sent from handle_anongame_search() in anongame.c *//* 0x02 */ static int _client_anongame_infos(t_connection * c, t_packet const * const packet);/* 0x03 */ static int _client_anongame_cancel(t_connection * c);/* 0x04 */ static int _client_anongame_profile(t_connection * c, t_packet const * const packet);/* 0x05 */ /* AT style search - handle_anongame_search() in anongame.c *//* 0x06 */ /* AT style search (Inviter) handle_anongame_search() in anongame.c *//* 0x07 */ static int _client_anongame_tournament(t_connection * c, t_packet const * const packet);/* 0x08 */ static int _client_anongame_profile_clan(t_connection * c, t_packet const * const packet);/* 0x09 */ static int _client_anongame_get_icon(t_connection * c, t_packet const * const packet);/* 0x0A */ static int _client_anongame_set_icon(t_connection * c, t_packet const * const packet);/* misc functions used by _client_anongame_tournament() */static unsigned int _tournament_time_convert(unsigned int time);/* and now the functions */static int _client_anongame_profile_clan(t_connection * c, t_packet const * const packet){    t_packet * rpacket;    int clantag;    int clienttag;    int count;    int temp;    t_clan * clan;    unsigned char rescount;    if (packet_get_size(packet)<sizeof(t_client_findanongame_profile_clan))    {	eventlog(eventlog_level_error,__FUNCTION__,"[%d] got bad ANONGAME_PROFILE_CLAN packet (expected %u bytes, got %u)",conn_get_socket(c), sizeof(t_client_findanongame_profile_clan), packet_get_size(packet));	return -1;    }    clantag = bn_int_get(packet->u.client_findanongame_profile_clan.clantag);    clienttag = bn_int_get(packet->u.client_findanongame_profile_clan.clienttag);    count = bn_int_get(packet->u.server_findanongame_profile_clan.count);    clan = clanlist_find_clan_by_clantag(clantag);    if ((rpacket = packet_create(packet_class_bnet)))    {	packet_set_size(rpacket,sizeof(t_server_findanongame_profile_clan));	packet_set_type(rpacket,SERVER_FINDANONGAME_PROFILE_CLAN);	bn_byte_set(&rpacket->u.server_findanongame_profile_clan.option,CLIENT_FINDANONGAME_PROFILE_CLAN);	bn_int_set(&rpacket->u.server_findanongame_profile_clan.count,count);	rescount = 0;	if (!(clan))	{	   temp = 0;	   packet_append_data(rpacket,&temp,1);	}	else	{	   temp = 0;	   packet_append_data(rpacket,&temp,1);	   /* need to add clan stuff here:	   	format:		bn_int	ladder_tag (SNLC, 2NLC, 3NLC, 4NLC)		bn_int	wins		bn_int	losses		bn_byte rank		bn_byte progess bar		bn_int	xp		bn_int	rank		bn_byte 0x06 <-- random + 5 races		6 times:		bn_int  wins		bn_int	losses	    */	}		bn_byte_set(&rpacket->u.server_findanongame_profile_clan.rescount,rescount);	conn_push_outqueue(c,rpacket);	packet_del_ref(rpacket);	    }      return 0;}static int _client_anongame_profile(t_connection * c, t_packet const * const packet){    t_packet * rpacket;    char const * username;    int Count, i;    int temp;    t_account * account;     t_connection * dest_c;    t_clienttag ctag;    char clienttag_str[5];    t_list * teamlist;    unsigned char teamcount;    unsigned char *atcountp;    t_elem * curr;    t_team * team;    t_bnettime bn_time;    bn_long ltime;            Count = bn_int_get(packet->u.client_findanongame.count);    eventlog(eventlog_level_info,__FUNCTION__,"[%d] got a FINDANONGAME PROFILE packet",conn_get_socket(c));        if (!(username = packet_get_str_const(packet,sizeof(t_client_findanongame_profile),USER_NAME_MAX)))    {	eventlog(eventlog_level_error,__FUNCTION__,"[%d] got bad FINDANONGAME_PROFILE (missing or too long username)",conn_get_socket(c));	return -1;    }        //If no account is found then break    if (!(account = accountlist_find_account(username)))    {					eventlog(eventlog_level_error, __FUNCTION__, "Could not get account - PROFILE");	return -1;    }										    if (!(dest_c = connlist_find_connection_by_accountname(username))) {	eventlog(eventlog_level_debug, __FUNCTION__, "account is offline -  try ll_clienttag");	if (!(ctag = account_get_ll_clienttag(account))) return -1;    }    else    ctag = conn_get_clienttag(dest_c);    eventlog(eventlog_level_info,__FUNCTION__,"Looking up %s's %s Stats.",username,tag_uint_to_str(clienttag_str,ctag));    if (account_get_ladder_level(account,ctag,ladder_id_solo)<=0 &&         account_get_ladder_level(account,ctag,ladder_id_team)<=0 &&         account_get_ladder_level(account,ctag,ladder_id_ffa)<=0 && 	account_get_teams(account)==NULL)    {	eventlog(eventlog_level_info,__FUNCTION__,"%s does not have WAR3 Stats.",username);	if (!(rpacket = packet_create(packet_class_bnet)))	    return -1;	packet_set_size(rpacket,sizeof(t_server_findanongame_profile2));	packet_set_type(rpacket,SERVER_FINDANONGAME_PROFILE);	bn_byte_set(&rpacket->u.server_findanongame_profile2.option,CLIENT_FINDANONGAME_PROFILE);	bn_int_set(&rpacket->u.server_findanongame_profile2.count,Count);	bn_int_set(&rpacket->u.server_findanongame_profile2.icon,account_icon_to_profile_icon(account_get_user_icon(account,ctag),account,ctag));	bn_byte_set(&rpacket->u.server_findanongame_profile2.rescount,0);	temp=0;	packet_append_data(rpacket,&temp,2); 	conn_push_outqueue(c,rpacket);	packet_del_ref(rpacket);    }    else // If they do have a profile then:    {	int solowins=account_get_ladder_wins(account,ctag,ladder_id_solo); 	int sololoss=account_get_ladder_losses(account,ctag,ladder_id_solo);	int soloxp=account_get_ladder_xp(account,ctag,ladder_id_solo);	int sololevel=account_get_ladder_level(account,ctag,ladder_id_solo);	int solorank=account_get_ladder_rank(account,ctag,ladder_id_solo);	int teamwins=account_get_ladder_wins(account,ctag,ladder_id_team);	int teamloss=account_get_ladder_losses(account,ctag,ladder_id_team);	int teamxp=account_get_ladder_xp(account,ctag,ladder_id_team);	int teamlevel=account_get_ladder_level(account,ctag,ladder_id_team);	int teamrank=account_get_ladder_rank(account,ctag,ladder_id_team);	int ffawins=account_get_ladder_wins(account,ctag,ladder_id_ffa);	int ffaloss=account_get_ladder_losses(account,ctag,ladder_id_ffa);	int ffaxp=account_get_ladder_xp(account,ctag,ladder_id_ffa);	int ffalevel=account_get_ladder_level(account,ctag,ladder_id_ffa);	int ffarank=account_get_ladder_rank(account,ctag,ladder_id_ffa);	int humanwins=account_get_racewins(account,1,ctag);	int humanlosses=account_get_racelosses(account,1,ctag);	int orcwins=account_get_racewins(account,2,ctag);	int orclosses=account_get_racelosses(account,2,ctag);	int undeadwins=account_get_racewins(account,8,ctag);	int undeadlosses=account_get_racelosses(account,8,ctag);	int nightelfwins=account_get_racewins(account,4,ctag);	int nightelflosses=account_get_racelosses(account,4,ctag);	int randomwins=account_get_racewins(account,0,ctag);	int randomlosses=account_get_racelosses(account,0,ctag);	unsigned char rescount;	if (!(rpacket = packet_create(packet_class_bnet)))	    return -1;	packet_set_size(rpacket,sizeof(t_server_findanongame_profile2));	packet_set_type(rpacket,SERVER_FINDANONGAME_PROFILE);	bn_byte_set(&rpacket->u.server_findanongame_profile2.option,CLIENT_FINDANONGAME_PROFILE);	bn_int_set(&rpacket->u.server_findanongame_profile2.count,Count); //job count	bn_int_set(&rpacket->u.server_findanongame_profile2.icon,account_icon_to_profile_icon(account_get_user_icon(account,ctag),account,ctag));	rescount = 0;	if (sololevel > 0) {	    bn_int_set((bn_int*)&temp,0x534F4C4F); // SOLO backwards	    packet_append_data(rpacket,&temp,4);	    temp=0;	    bn_int_set((bn_int*)&temp,solowins);	    packet_append_data(rpacket,&temp,2); //SOLO WINS	    bn_int_set((bn_int*)&temp,sololoss);	    packet_append_data(rpacket,&temp,2); // SOLO LOSSES	    bn_int_set((bn_int*)&temp,sololevel);	    packet_append_data(rpacket,&temp,1); // SOLO LEVEL	    bn_int_set((bn_int*)&temp,account_get_profile_calcs(account,soloxp,sololevel));	    packet_append_data(rpacket,&temp,1); // SOLO PROFILE CALC	    bn_int_set((bn_int *)&temp,soloxp);	    packet_append_data(rpacket,&temp,2); // SOLO XP	    bn_int_set((bn_int *)&temp,solorank);	    packet_append_data(rpacket,&temp,4); // SOLO LADDER RANK	    rescount++;	}	if (teamlevel > 0) {	    //below is for team records. Add this after 2v2,3v3,4v4 are done	    bn_int_set((bn_int*)&temp,0x5445414D); 	    packet_append_data(rpacket,&temp,4);	    bn_int_set((bn_int*)&temp,teamwins);	    packet_append_data(rpacket,&temp,2);	    bn_int_set((bn_int*)&temp,teamloss);	    packet_append_data(rpacket,&temp,2);	    bn_int_set((bn_int*)&temp,teamlevel);	    packet_append_data(rpacket,&temp,1);	    bn_int_set((bn_int*)&temp,account_get_profile_calcs(account,teamxp,teamlevel));	    	    packet_append_data(rpacket,&temp,1);	    bn_int_set((bn_int*)&temp,teamxp);	    packet_append_data(rpacket,&temp,2);	    bn_int_set((bn_int*)&temp,teamrank);	    packet_append_data(rpacket,&temp,4);	    //done of team game stats	    rescount++;	}	if (ffalevel > 0) {	    bn_int_set((bn_int*)&temp,0x46464120);	    packet_append_data(rpacket,&temp,4);	    bn_int_set((bn_int*)&temp,ffawins);	    packet_append_data(rpacket,&temp,2);	    bn_int_set((bn_int*)&temp,ffaloss);	    packet_append_data(rpacket,&temp,2);	    bn_int_set((bn_int*)&temp,ffalevel);	    packet_append_data(rpacket,&temp,1);	    bn_int_set((bn_int*)&temp,account_get_profile_calcs(account,ffaxp,ffalevel));	    packet_append_data(rpacket,&temp,1);	    bn_int_set((bn_int*)&temp,ffaxp);	    packet_append_data(rpacket,&temp,2);	    bn_int_set((bn_int*)&temp,ffarank);	    packet_append_data(rpacket,&temp,4);	    //End of FFA Stats	    rescount++;	}	/* set result count */	bn_byte_set(&rpacket->u.server_findanongame_profile2.rescount,rescount);	bn_int_set((bn_int*)&temp,0x06); //start of race stats	packet_append_data(rpacket,&temp,1);	bn_int_set((bn_int*)&temp,randomwins);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色偷偷一区二区三区| 中文字幕欧美一区| 亚洲欧美日韩小说| 久久国产精品99精品国产| 91色|porny| 久久婷婷久久一区二区三区| 自拍视频在线观看一区二区| 国产成人在线看| 欧美日韩成人综合| 亚洲视频中文字幕| 国产成人在线免费观看| 欧美一卡二卡三卡四卡| 一区二区高清在线| 成人免费黄色大片| 久久久综合激的五月天| 免费欧美在线视频| 欧美二区乱c少妇| 午夜久久久久久久久久一区二区| 99在线视频精品| 国产欧美精品区一区二区三区| 视频一区二区欧美| 欧美日韩日日骚| 亚洲激情网站免费观看| 成人动漫视频在线| 欧美国产激情一区二区三区蜜月| 男女男精品网站| 日韩一区二区影院| 久久99久久久欧美国产| 日韩三级伦理片妻子的秘密按摩| 亚洲123区在线观看| 在线一区二区三区| 亚洲电影你懂得| 欧美色手机在线观看| 午夜视频一区二区| 欧美精品tushy高清| 日韩电影一区二区三区四区| 欧美日韩大陆一区二区| 日韩精品亚洲一区| 欧美电影在哪看比较好| 日韩成人精品在线观看| 欧美一区二区黄色| 激情六月婷婷久久| 久久久久久久久一| 成人精品免费看| 自拍偷拍国产精品| 欧美色窝79yyyycom| 人人超碰91尤物精品国产| 精品久久久久一区二区国产| 国产精品资源在线观看| 国产精品美女久久久久久久久 | 国产精品国产精品国产专区不蜜| 国产激情偷乱视频一区二区三区| 国产精品素人视频| 色婷婷亚洲综合| 日韩成人av影视| 久久久噜噜噜久噜久久综合| 99久久精品免费精品国产| 亚洲综合网站在线观看| 日韩午夜在线播放| 粉嫩在线一区二区三区视频| 亚洲欧美日韩人成在线播放| 欧美精三区欧美精三区| 国产一区二区调教| 亚洲日本成人在线观看| 91精品欧美久久久久久动漫| 国产米奇在线777精品观看| 综合亚洲深深色噜噜狠狠网站| 欧美午夜精品理论片a级按摩| 久久国产尿小便嘘嘘| 中文字幕日韩一区| 欧美一级免费大片| 成人午夜电影网站| 日韩成人免费看| 亚洲色图清纯唯美| 精品少妇一区二区三区视频免付费 | 一区二区三区日本| 久久综合色之久久综合| 色哟哟国产精品| 国产精品综合一区二区三区| 亚洲免费av网站| www激情久久| 欧美三级在线看| 成人ar影院免费观看视频| 日本亚洲电影天堂| 亚洲一区免费视频| 国产精品久线在线观看| 欧美成人三级电影在线| 欧美在线一二三| a美女胸又www黄视频久久| 久久97超碰国产精品超碰| 亚洲v中文字幕| 中文字幕一区二区三区色视频| 欧美不卡视频一区| 欧美日韩www| 欧美亚洲国产怡红院影院| 成人精品国产福利| 国产成人在线视频网站| 精品一区二区免费视频| 日日夜夜免费精品视频| 亚洲精品日韩综合观看成人91| 国产日韩欧美一区二区三区综合| 欧美精品高清视频| 欧美色男人天堂| 欧美视频一二三区| 欧美体内she精高潮| 97久久精品人人澡人人爽| 成人免费三级在线| 成人精品在线视频观看| 成人黄色电影在线| 国产成人av资源| www.欧美亚洲| 成人高清视频免费观看| 成人短视频下载| 丁香啪啪综合成人亚洲小说| 国产69精品久久777的优势| 国产精品一品二品| 懂色av一区二区三区免费看| 韩国一区二区三区| 国产不卡视频在线播放| 国产精品18久久久久久久网站| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美另类高清zo欧美| 欧美色窝79yyyycom| 欧美日韩国产123区| 欧美精品日韩综合在线| 日韩一区和二区| 欧美电影免费观看高清完整版在 | 麻豆成人av在线| 蜜桃视频在线观看一区二区| 琪琪久久久久日韩精品| 麻豆国产欧美日韩综合精品二区| 韩国视频一区二区| 不卡视频在线看| 91麻豆文化传媒在线观看| 欧美亚洲尤物久久| 日韩欧美资源站| 国产欧美一二三区| 夜夜爽夜夜爽精品视频| 日日骚欧美日韩| 国产一区二区三区在线观看免费| 成人一区二区三区视频在线观看 | 婷婷久久综合九色综合绿巨人| 视频一区在线播放| 国产精品一级片| 欧美在线free| 欧美videofree性高清杂交| 国产欧美日韩综合精品一区二区 | 欧美日产国产精品| 精品精品国产高清一毛片一天堂| 中文无字幕一区二区三区| 亚洲午夜久久久久久久久久久 | 97se狠狠狠综合亚洲狠狠| 欧美精品电影在线播放| 亚洲国产经典视频| 首页欧美精品中文字幕| av一区二区三区黑人| 欧美精品粉嫩高潮一区二区| 中文字幕国产一区| 日韩免费视频一区| 精品一区二区三区的国产在线播放 | 5月丁香婷婷综合| 一区二区三区欧美| 91麻豆国产在线观看| 国产精品欧美久久久久一区二区| 国产福利一区二区三区视频| 精品国产3级a| 国产精品18久久久久久久久久久久| 精品国产a毛片| 国产精品亚洲人在线观看| 久久久久88色偷偷免费 | 粗大黑人巨茎大战欧美成人| 精品国产污污免费网站入口| 久久国产精品区| 久久先锋影音av鲁色资源| 国产一区二区三区高清播放| 国产亚洲欧美色| jizz一区二区| 亚洲自拍偷拍九九九| 欧美日韩一区二区电影| 欧美高清视频在线高清观看mv色露露十八| 国产精品传媒入口麻豆| 99国产精品久久久久久久久久久| 亚洲欧美成aⅴ人在线观看| 在线观看日产精品| 日韩国产欧美一区二区三区| 日韩午夜激情免费电影| 国产成人免费在线观看不卡| 中文字幕一区二区视频| 欧美一a一片一级一片| 日韩电影一区二区三区四区| 欧美精品一区二区三| 国产精品1区2区3区在线观看| 中文字幕在线不卡| 欧美日韩一级二级| 国内精品视频666| 自拍偷拍亚洲激情| 欧美一区二区三区在线观看视频| 黑人巨大精品欧美黑白配亚洲| 国产精品久久看| 欧美精品乱人伦久久久久久|