void NPC_DepotItem_Item_printWindow( int meindex, int talkerindex)
{
	char	itemstring[65536-1024];
	char	sendstring[65536];
	char	argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	char	buff2[1024];
	char	buff3[1024];
	char	buff4[1024];
	int fd;
	
	if( (fd = getfdFromCharaIndex( talkerindex)) == -1 ){
		fprint( "err\n");
		return;
	}
	argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1));
	snprintf( sendstring, sizeof( sendstring), "0|%d|%s|%s|%s|%s|",
			CHAR_getfindEmptyDepotItem( talkerindex),
			CHAR_getChar( meindex, CHAR_NAME),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_POOL, argstr, buff2, sizeof( buff2)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_POOLFULL, argstr, buff3, sizeof( buff3)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_REALY, argstr, buff4, sizeof( buff4))
			);

	NPC_DepotItem_MakeItemString( meindex, talkerindex, itemstring, sizeof( itemstring));
	strcat( sendstring, itemstring);
	lssproto_WN_send( fd, WINDOW_MESSAGETYPE_POOLITEMSHOPMAIN,
				WINDOW_BUTTONTYPE_NONE, 
				CHAR_WINDOWTYPE_DEPOTITEMSHOP_ADD,
				CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX), sendstring);
	
}
void NPC_DepotItem_Depot_printWindow( int meindex, int talkerindex)
{
	char	itemstring[65536-1024];
	char	sendstring[65536];
	char	argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	char	buff[1024];
	char	buff2[1024];
	char	buff3[1024];
	int fd;
	
	if( (fd = getfdFromCharaIndex( talkerindex)) == -1 )return;
	argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1));
	snprintf( sendstring, sizeof( sendstring), "1|%s|%s|%s|%s|",
			CHAR_getChar( meindex, CHAR_NAME),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_DRAW, argstr, buff2, sizeof( buff2)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_ITEMFULL, argstr, buff, sizeof( buff)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_REALY, argstr, buff3, sizeof( buff3))
			);
	NPC_DepotItem_MakeDepotString( meindex, talkerindex, itemstring, sizeof( itemstring));
	strcat( sendstring, itemstring);
	lssproto_WN_send( fd, WINDOW_MESSAGETYPE_POOLITEMSHOPMAIN,
				WINDOW_BUTTONTYPE_NONE, 
				CHAR_WINDOWTYPE_DEPOTITEMSHOP_GET,
				CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX),
				sendstring);
	
	//print("\n NPC_DepotItem_Depot_printWindow:%s size:%d ", sendstring, strlen(sendstring));
}
static void NPC_PoolItemShop_printWindow_Draw( int meindex, int talkerindex)
{
	char	itemstring[65536-1024];
	char	sendstring[65536];
	char	argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
	char *argstr;
	char	buff[1024];
	char	buff2[1024];
	char	buff3[1024];
	int fd;
	
	fd = getfdFromCharaIndex( talkerindex);
	if( fd == -1 ) {
		fprint( "err\n");
		return;
	}

	argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof( argstr1));
	
	snprintf( sendstring, sizeof( sendstring), "1|%s|%s|%s|%s|",
			CHAR_getChar( meindex, CHAR_NAME),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_DRAW, 
										argstr, buff2, sizeof( buff2)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_ITEMFULL, 
										argstr, buff, sizeof( buff)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_REALY, 
										argstr, buff3, sizeof( buff3))
			);
	NPC_PoolItemShop_MakeItemString_Draw( meindex, talkerindex, 
									itemstring, sizeof( itemstring));
	strcat( sendstring, itemstring);
	lssproto_WN_send( fd, WINDOW_MESSAGETYPE_POOLITEMSHOPMAIN,
				WINDOW_BUTTONTYPE_NONE, 
				CHAR_WINDOWTYPE_POOLITEMSHOP_DRAW_MSG,
				CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX),
				sendstring);
	
}
示例#4
0
static void NPC_PoolItemShop_printWindow_Pool( int meindex, int talkerindex)
{
	char	itemstring[NPC_UTIL_GETARGSTR_BUFSIZE - 1024 * 20];
	char	sendstring[NPC_UTIL_GETARGSTR_BUFSIZE - 1024 * 20];
	char	argstr[NPC_UTIL_GETARGSTR_BUFSIZE - 1024 * 20];
	char	buff2[1024];
	char	buff3[1024];
	char	buff4[1024];
	int fd;
	
	fd = getfdFromCharaIndex( talkerindex);
	if( fd == -1 ) {
		fprint( "err\n");
		return;
	}

	NPC_Util_GetArgStr( meindex, argstr, sizeof( argstr));
	
	snprintf( sendstring, sizeof( sendstring), "0|%d|%s|%s|%s|%s|",
			CHAR_getEmptyCharPoolItemIndexNum( talkerindex),
			CHAR_getChar( meindex, CHAR_NAME),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_POOL, 
										argstr, buff2, sizeof( buff2)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_POOLFULL, 
										argstr, buff3, sizeof( buff3)),
			NPC_PoolItemShop_getMsg_noarg( NPC_POOLITEMSHOP_MSG_REALY, 
										argstr, buff4, sizeof( buff4))
			);
	
	NPC_PoolItemShop_MakeItemString_Pool( meindex, talkerindex, itemstring, sizeof( itemstring));
	strcat( sendstring, itemstring);
	lssproto_WN_send( fd, WINDOW_MESSAGETYPE_POOLITEMSHOPMAIN,
				WINDOW_BUTTONTYPE_NONE, 
				CHAR_WINDOWTYPE_POOLITEMSHOP_POOL_MSG,
				CHAR_getWorkInt( meindex, CHAR_WORKOBJINDEX),
				sendstring);
	
}