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


C++ WBUFW函数代码示例

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


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

示例1: WBUFL

CCaughtFishPacket::CCaughtFishPacket(CCharEntity * PChar, uint16 param0, uint16 messageID) 
{
	this->type = 0x27;
	this->size = 0x38;

	//DSP_DEBUG_BREAK_IF(PChar->name.size() > 15);

	WBUFL(data,(0x04)) = PChar->id;
	WBUFL(data,(0x08)) = PChar->targid;

	WBUFW(data,(0x0A)) = messageID + 0x8000;
	WBUFW(data,(0x10)) = param0;

	WBUFL(data,(0x14)) = 0x01;
	WBUFL(data,(0x1C)) = 0xF0;

	memcpy(data+(0x20), PChar->GetName(), PChar->name.size());
}
开发者ID:Alice5150,项目名称:darkstar,代码行数:18,代码来源:caught_fish.cpp

示例2: WBUFB

CServerIPPacket::CServerIPPacket(CCharEntity* PChar, uint8 type)
{
	this->type = 0x0B;
	this->size = 0x0E;

	WBUFB(data,(0x04)-4) = type;
	WBUFL(data,(0x08)-4) = PChar->loc.zone->GetIP();
	WBUFW(data,(0x0C)-4) = PChar->loc.zone->GetPort();
}
开发者ID:Laterus,项目名称:Darkstar-Linux-Fork,代码行数:9,代码来源:server_ip.cpp

示例3: WBUFL

CChocoboDiggingPacket::CChocoboDiggingPacket(CCharEntity* PChar)
{
	this->type = 0x2F;
	this->size = 0x06;

	WBUFL(data,(0x04)-4) = PChar->id;
	WBUFW(data,(0x08)-4) = PChar->targid;
	WBUFB(data,(0x0A)-4) = 0x01;
}
开发者ID:Annihilus343,项目名称:darkstar,代码行数:9,代码来源:chocobo_digging.cpp

示例4: WBUFL

CMessageSystemPacket::CMessageSystemPacket(uint32 param0, uint32 param1, uint16 messageID)
{
	this->type = 0x53;
	this->size = 0x08;

	WBUFL(data,(0x04)) = param0;
	WBUFL(data,(0x08)) = param1;
	WBUFW(data,(0x0C)) = messageID;
}
开发者ID:Alice5150,项目名称:darkstar,代码行数:9,代码来源:message_system.cpp

示例5: mapif_send_maxid

//Sends to map server the current max Account/Char id [Skotlex]
void mapif_send_maxid(int account_id, int char_id)
{
    unsigned char buf[12];

    WBUFW(buf,0) = 0x2b07;
    WBUFL(buf,2) = account_id;
    WBUFL(buf,6) = char_id;
    mapif_sendall(buf, 10);
}
开发者ID:mleo1,项目名称:Ragnarok-OldTimes,代码行数:10,代码来源:inter.c

示例6: mapif_party_broken

// パーティ解散通知
void mapif_party_broken(int party_id, int flag)
{
    unsigned char buf[7];
    WBUFW(buf, 0) = 0x3826;
    WBUFL(buf, 2) = party_id;
    WBUFB(buf, 6) = flag;
    mapif_sendall(buf, 7);
    PRINTF("int_party: broken %d\n", party_id);
}
开发者ID:cinderweb,项目名称:tmwa,代码行数:10,代码来源:int_party.cpp

示例7: mapif_Auction_message

static void mapif_Auction_message(int char_id, unsigned char result)
{
	unsigned char buf[74];
	
	WBUFW(buf,0) = 0x3854;
	WBUFL(buf,2) = char_id;
	WBUFL(buf,6) = result;
	mapif_sendall(buf,7);
}
开发者ID:Boooo,项目名称:i-aint-quitting,代码行数:9,代码来源:int_auction.c

示例8: mapif_wis_end

// Wis sending result
int mapif_wis_end (struct WisData *wd, int flag)
{
	unsigned char buf[27];
	WBUFW (buf, 0) = 0x3802;
	memcpy (WBUFP (buf, 2), wd->src, 24);
	WBUFB (buf, 26) = flag;
	mapif_send (wd->fd, buf, 27);
	return 0;
}
开发者ID:Celso1415,项目名称:Fusion,代码行数:10,代码来源:inter.c

示例9: WBUFW

CWideScanPacket::CWideScanPacket(CCharEntity * PChar, CBaseEntity * PEntity) 
{
	this->type = 0xF4;
	this->size = 0x0E;

	WBUFW(data,(0x04)-4) = PEntity->targid;
  //WBUFB(data,(0x06)-4) = PEntity->GetMLevel();

	// 0 - черная точка (? Char ?) 
	// 1 - зеленая точка (NPC)
	// 2 - красная точка (Mob)
	WBUFB(data,(0x07)-4) = PEntity->objtype/2; 

	WBUFW(data,(0x08)-4) = (int16)(PEntity->loc.p.x - PChar->loc.p.x); // x - разница координат персонажа и объекта
	WBUFW(data,(0x0A)-4) = (int16)(PEntity->loc.p.z - PChar->loc.p.z); // z - разница координат персонажа и объекта

  //memcpy(data+(0x0C)-4, PEntity->GetName(), (PEntity->name.size() > 14 ? 14 : PEntity->name.size()));  
}
开发者ID:ZeDingo,项目名称:darkstar,代码行数:18,代码来源:wide_scan.cpp

示例10: mapif_parse_broadcast_item

/**
 * Parse received item broadcast and sends it to all connected map-serves
 * ZI 3009 <cmd>.W <len>.W <nameid>.W <source>.W <type>.B <name>.24B <srcname>.24B
 * IZ 3809 <cmd>.W <len>.W <nameid>.W <source>.W <type>.B <name>.24B <srcname>.24B
 * @param fd
 * @return
 **/
int mapif_parse_broadcast_item(int fd) {
	unsigned char buf[9 + NAME_LENGTH*2];

	memcpy(WBUFP(buf, 0), RFIFOP(fd, 0), RFIFOW(fd,2));
	WBUFW(buf, 0) = 0x3809;
	chmapif_sendallwos(fd, buf, RFIFOW(fd,2));

	return 0;
}
开发者ID:Lemongrass3110,项目名称:rathena,代码行数:16,代码来源:inter.cpp

示例11: mapif_party_optionchanged

// パーティ設定変更通知
static
void mapif_party_optionchanged(int fd, struct party *p, int account_id,
                               int flag)
{
    unsigned char buf[15];

    WBUFW(buf, 0) = 0x3823;
    WBUFL(buf, 2) = p->party_id;
    WBUFL(buf, 6) = account_id;
    WBUFW(buf, 10) = p->exp;
    WBUFW(buf, 12) = p->item;
    WBUFB(buf, 14) = flag;
    if (flag == 0)
        mapif_sendall(buf, 15);
    else
        mapif_send(fd, buf, 15);
    PRINTF("int_party: option changed %d %d %d %d %d\n", p->party_id,
            account_id, p->exp, p->item, flag);
}
开发者ID:cinderweb,项目名称:tmwa,代码行数:20,代码来源:int_party.cpp

示例12: WBUFL

CRaiseTractorMenuPacket::CRaiseTractorMenuPacket(CCharEntity * PChar, REVIVAL_TYPE type) 
{
	this->type = 0xF9;
	this->size = 0x06;

	WBUFL(data,(0x04)-4) = PChar->id;
	WBUFW(data,(0x08)-4) = PChar->targid;

	WBUFB(data,(0x0A)-4) = type;
}
开发者ID:Annihilus343,项目名称:darkstar,代码行数:10,代码来源:menu_raisetractor.cpp

示例13: memset

CAHHistoryPacket::CAHHistoryPacket(uint16 ItemID)
{
    m_count  = 0;

    memset(m_PData, 0, sizeof(m_PData));

    WBUFB(m_PData,(0x0A)) = 0x80;
    WBUFB(m_PData,(0x0B)) = 0x85;                       // packe type
    WBUFW(m_PData,(0x10)) = ItemID;
}
开发者ID:Apocalypse612,项目名称:darkstar,代码行数:10,代码来源:auction_history.cpp

示例14: strlen

CSpoofMessagePacket::CSpoofMessagePacket(CCharEntity* PChar, int8* name, CHAT_MESSAGE_TYPE MessageType, int8* buff)
{
    int32 buffSize = (strlen(buff) > 108) ? 108 : strlen(buff);
    this->type = 0x17;
    this->size = dsp_min((32 + (buffSize + 1) + ((4 - ((buffSize + 1) % 4)) % 4)) / 2, 128);
    WBUFB(data, (0x04) - 4) = MessageType;
    WBUFW(data, (0x06) - 4) = PChar->getZone();
    memcpy(data + (0x08) - 4, name, size);
    memcpy(data + (0x18) - 4, buff, buffSize);
}
开发者ID:Desufire,项目名称:darkstar,代码行数:10,代码来源:chat_message.cpp

示例15: WBUFL

CTradeItemPacket::CTradeItemPacket(CItem* PItem, uint8 slot)
{
	this->type = 0x25;
	this->size = 0x06;
	
    WBUFL(data,(0x04)-4) = PItem->getReserve();
	WBUFW(data,(0x08)-4) = PItem->getID();
	WBUFB(data,(0x0A)-4) = slot;
	WBUFB(data,(0x0B)-4) = PItem->getSlotID();
}
开发者ID:Gwynthell,项目名称:FFDB,代码行数:10,代码来源:trade_item.cpp


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