当前位置: 首页>>代码示例>>C++>>正文


C++ WFIFOB函数代码示例

本文整理汇总了C++中WFIFOB函数的典型用法代码示例。如果您正苦于以下问题:C++ WFIFOB函数的具体用法?C++ WFIFOB怎么用?C++ WFIFOB使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了WFIFOB函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: chlogif_BankingReq

/**
 * Send to login-serv the request of banking operation from map
 * HA 0x2740<aid>L <type>B <data>L
 * @param account_id
 * @param type : 0 = select, 1 = update
 * @param data
 * @return
 */
int chlogif_BankingReq(int32 account_id, int8 type, int32 data){
	loginif_check(-1);

	WFIFOHEAD(login_fd,11);
	WFIFOW(login_fd,0) = 0x2740;
	WFIFOL(login_fd,2) = account_id;
	WFIFOB(login_fd,6) = type;
	WFIFOL(login_fd,7) = data;
	WFIFOSET(login_fd,11);
	return 0;
}
开发者ID:VirtualEstatePlanner,项目名称:RagnaBox,代码行数:19,代码来源:char_logif.c

示例2: mapif_homunculus_renamed

void mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned char flag, const char *name)
{
	nullpo_retv(name);
	WFIFOHEAD(fd, NAME_LENGTH+12);
	WFIFOW(fd, 0) = 0x3894;
	WFIFOL(fd, 2) = account_id;
	WFIFOL(fd, 6) = char_id;
	WFIFOB(fd,10) = flag;
	safestrncpy(WFIFOP(fd,11), name, NAME_LENGTH);
	WFIFOSET(fd, NAME_LENGTH+12);
}
开发者ID:Evolutin,项目名称:Hercules,代码行数:11,代码来源:int_homun.c

示例3: mapif_homun_created

int mapif_homun_created(int fd,int account_id, struct s_homunculus *p)
{
	WFIFOHEAD(fd, sizeof(struct s_homunculus)+9);
	WFIFOW(fd, 0) =0x3890;
	WFIFOW(fd,2) = sizeof(struct s_homunculus)+9;
	WFIFOL(fd,4) = account_id;
	WFIFOB(fd,8)= p->hom_id?1:0;
	memcpy(WFIFOP(fd,9), p, sizeof(struct s_homunculus));
	WFIFOSET(fd, WFIFOW(fd,2));
	return 0;
}
开发者ID:Epsynus,项目名称:Tripping-nemesis,代码行数:11,代码来源:int_homun.c

示例4: mapif_elemental_send

void mapif_elemental_send(int fd, struct s_elemental *ele, unsigned char flag) {
	int size = sizeof(struct s_elemental) + 5;

	nullpo_retv(ele);
	WFIFOHEAD(fd,size);
	WFIFOW(fd,0) = 0x387c;
	WFIFOW(fd,2) = size;
	WFIFOB(fd,4) = flag;
	memcpy(WFIFOP(fd,5),ele,sizeof(struct s_elemental));
	WFIFOSET(fd,size);
}
开发者ID:3298021,项目名称:Hercules,代码行数:11,代码来源:int_elemental.c

示例5: mapif_party_created

// Create a party whether or not
int mapif_party_created(int fd,int account_id,int char_id,struct party *p)
{
	WFIFOHEAD(fd, 39);
	WFIFOW(fd,0)=0x3820;
	WFIFOL(fd,2)=account_id;
	WFIFOL(fd,6)=char_id;
	if(p!=NULL){
		WFIFOB(fd,10)=0;
		WFIFOL(fd,11)=p->party_id;
		memcpy(WFIFOP(fd,15),p->name,NAME_LENGTH);
		ShowInfo("int_party: Party created (%d - %s)\n",p->party_id,p->name);
	}else{
		WFIFOB(fd,10)=1;
		WFIFOL(fd,11)=0;
		memset(WFIFOP(fd,15),0,NAME_LENGTH);
	}
	WFIFOSET(fd,39);

	return 0;
}
开发者ID:BlazingSpear,项目名称:rathena,代码行数:21,代码来源:int_party.c

示例6: mapif_homunculus_created

void mapif_homunculus_created(int fd, int account_id, const struct s_homunculus *sh, unsigned char flag)
{
	nullpo_retv(sh);
	WFIFOHEAD(fd, sizeof(struct s_homunculus)+9);
	WFIFOW(fd,0) = 0x3890;
	WFIFOW(fd,2) = sizeof(struct s_homunculus)+9;
	WFIFOL(fd,4) = account_id;
	WFIFOB(fd,8)= flag;
	memcpy(WFIFOP(fd,9),sh,sizeof(struct s_homunculus));
	WFIFOSET(fd, WFIFOW(fd,2));
}
开发者ID:Evolutin,项目名称:Hercules,代码行数:11,代码来源:int_homun.c

示例7: mapif_party_created

/// Party creation notification.
/// @param result 0 on success, 1 on failure
static void mapif_party_created(int fd, int account_id, int char_id, int result, int party_id, const char* name)
{
	WFIFOHEAD(fd, 39);
	WFIFOW(fd,0) = 0x3820;
	WFIFOL(fd,2) = account_id;
	WFIFOL(fd,6) = char_id;
	WFIFOB(fd,10) = result;
	WFIFOL(fd,11) = party_id;
	safestrncpy((char*)WFIFOP(fd,15), name, NAME_LENGTH);
	WFIFOSET(fd,39);
}
开发者ID:Tonetete,项目名称:eathena,代码行数:13,代码来源:int_party.c

示例8: mapif_disconnectplayer

//Request to kick char from a certain map server. [Skotlex]
int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason)
{
	if (fd < 0)
		return -1;
	
	WFIFOW(fd,0) = 0x2b1f;
	WFIFOL(fd,2) = account_id;
	WFIFOB(fd,6) = reason;
	WFIFOSET(fd,7);
	return 0;
}
开发者ID:AxlSckay,项目名称:Ragnarok-OldTimes,代码行数:12,代码来源:inter.c

示例9: mapif_party_memberadded

// パーティメンバ追加可否
int mapif_party_memberadded(int fd, int party_id, int account_id, int char_id, int flag) {
	WFIFOHEAD(fd, 15);
	WFIFOW(fd,0) = 0x3822;
	WFIFOL(fd,2) = party_id;
	WFIFOL(fd,6) = account_id;
	WFIFOL(fd,10) = char_id;
	WFIFOB(fd,14) = flag;
	WFIFOSET(fd,15);

	return 0;
}
开发者ID:Tonetete,项目名称:eathena,代码行数:12,代码来源:int_party.c

示例10: chrif_save

/*==========================================
 * Saves character data.
 * Flag = 1: Character is quitting
 * Flag = 2: Character is changing map-servers
 *------------------------------------------*/
int chrif_save(struct map_session_data *sd, int flag)
{
	nullpo_retr(-1, sd);

	pc_makesavestatus(sd);
	
	if (flag && sd->state.active) //Store player data which is quitting.
	{
		//FIXME: SC are lost if there's no connection at save-time because of the way its related data is cleared immediately after this function. [Skotlex]
		if (chrif_isconnected()) chrif_save_scdata(sd);
		if (!chrif_auth_logout(sd, flag==1?ST_LOGOUT:ST_MAPCHANGE))
			ShowError("chrif_save: Falha em configurar personagem %d:%d para sair adequadamente!\n", sd->status.account_id, sd->status.char_id);
	}

	if(!chrif_isconnected())
		return -1; //Character is saved on reconnect.

	//For data sync
	if (sd->state.storage_flag == 2)
		storage_guild_storagesave(sd->status.account_id, sd->status.guild_id, flag);

	if (flag)
		sd->state.storage_flag = 0; //Force close it.

	//Saving of registry values. 
	if (sd->state.reg_dirty&4)
		intif_saveregistry(sd, 3); //Save char regs
	if (sd->state.reg_dirty&2)
		intif_saveregistry(sd, 2); //Save account regs
	if (sd->state.reg_dirty&1)
		intif_saveregistry(sd, 1); //Save account2 regs

	WFIFOHEAD(char_fd, sizeof(sd->status) + 13);
	WFIFOW(char_fd,0) = 0x2b01;
	WFIFOW(char_fd,2) = sizeof(sd->status) + 13;
	WFIFOL(char_fd,4) = sd->status.account_id;
	WFIFOL(char_fd,8) = sd->status.char_id;
	WFIFOB(char_fd,12) = (flag==1)?1:0; //Flag to tell char-server this character is quitting.
	memcpy(WFIFOP(char_fd,13), &sd->status, sizeof(sd->status));
	WFIFOSET(char_fd, WFIFOW(char_fd,2));

	if( sd->status.pet_id > 0 && sd->pd )
		intif_save_petdata(sd->status.account_id,&sd->pd->pet);
	if( sd->hd && merc_is_hom_active(sd->hd) )
		merc_save(sd->hd);
	if( sd->md && mercenary_get_lifetime(sd->md) > 0 )
		mercenary_save(sd->md);
#ifndef TXT_ONLY
	if( sd->save_quest )
		intif_quest_save(sd);
#endif

	return 0;
}
开发者ID:JulioCF,项目名称:cronus-txt,代码行数:59,代码来源:chrif.c

示例11: intif_wis_replay

// The reply of Wisp/page
static
void intif_wis_replay(int id, int flag)
{
    WFIFOW(char_fd, 0) = 0x3002;
    WFIFOL(char_fd, 2) = id;
    WFIFOB(char_fd, 6) = flag;    // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
    WFIFOSET(char_fd, 7);

    if (battle_config.etc_log)
        PRINTF("intif_wis_replay: id: %d, flag:%d\n", id, flag);
}
开发者ID:cinderweb,项目名称:tmwa,代码行数:12,代码来源:intif.cpp

示例12: mapif_pet_info

int mapif_pet_info (int fd, int account_id, struct s_pet *p)
{
	WFIFOHEAD (fd, sizeof (struct s_pet) + 9);
	WFIFOW (fd, 0) = 0x3881;
	WFIFOW (fd, 2) = sizeof (struct s_pet) + 9;
	WFIFOL (fd, 4) = account_id;
	WFIFOB (fd, 8) = 0;
	memcpy (WFIFOP (fd, 9), p, sizeof (struct s_pet));
	WFIFOSET (fd, WFIFOW (fd, 2));
	return 0;
}
开发者ID:Celso1415,项目名称:Fusion,代码行数:11,代码来源:int_pet.c

示例13: mapif_mercenary_send

static void mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char flag)
{
	int size = sizeof(struct s_mercenary) + 5;

	WFIFOHEAD(fd,size);
	WFIFOW(fd,0) = 0x3870;
	WFIFOW(fd,2) = size;
	WFIFOB(fd,4) = flag;
	memcpy(WFIFOP(fd,5),merc,sizeof(struct s_mercenary));
	WFIFOSET(fd,size);
}
开发者ID:AxlSckay,项目名称:Ragnarok-OldTimes,代码行数:11,代码来源:int_mercenary.c

示例14: mapif_party_created

// パーティ作成可否
static
void mapif_party_created(int fd, int account_id, struct party *p)
{
    WFIFOW(fd, 0) = 0x3820;
    WFIFOL(fd, 2) = account_id;
    if (p != NULL)
    {
        WFIFOB(fd, 6) = 0;
        WFIFOL(fd, 7) = p->party_id;
        WFIFO_STRING(fd, 11, p->name, 24);
        PRINTF("int_party: created! %d %s\n", p->party_id, p->name);
    }
    else
    {
        WFIFOB(fd, 6) = 1;
        WFIFOL(fd, 7) = 0;
        WFIFO_STRING(fd, 11, "error", 24);
    }
    WFIFOSET(fd, 35);
}
开发者ID:cinderweb,项目名称:tmwa,代码行数:21,代码来源:int_party.cpp

示例15: mapif_pet_noinfo

int mapif_pet_noinfo (int fd, int account_id)
{
	WFIFOHEAD (fd, sizeof (struct s_pet) + 9);
	WFIFOW (fd, 0) = 0x3881;
	WFIFOW (fd, 2) = sizeof (struct s_pet) + 9;
	WFIFOL (fd, 4) = account_id;
	WFIFOB (fd, 8) = 1;
	memset (WFIFOP (fd, 9), 0, sizeof (struct s_pet));
	WFIFOSET (fd, WFIFOW (fd, 2));
	return 0;
}
开发者ID:Celso1415,项目名称:Fusion,代码行数:11,代码来源:int_pet.c


注:本文中的WFIFOB函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。