核心代码
/*获取道具时使用ui显示*/
function SendItemWindowNotification1(user, item_list)
{
var packet_guard = api_PacketGuard_PacketGuard();
InterfacePacketBuf_put_header(packet_guard, 1, 600); //协议 ENUM_NOTIPACKET_POWER_WAR_PROLONG
InterfacePacketBuf_put_byte(packet_guard, 1); //默认1
InterfacePacketBuf_put_byte(packet_guard, item_list.length); //道具组数
//写入道具代码和道具数量
for (var i = 0; i < item_list.length; i++)
{
InterfacePacketBuf_put_int(packet_guard, item_list[i][0]); //道具代码
InterfacePacketBuf_put_byte(packet_guard, item_list[i][1]); //道具数量 装备/时装时 任意均可
}
InterfacePacketBuf_finalize(packet_guard, 1); //确定发包内容
CUser_Send(user, packet_guard); //发包
Destroy_PacketGuard_PacketGuard(packet_guard); //清空buff区
}
SendItemWindowNotification1(user,[[1,50],[3037,10],[3340,10],[3326,50],[1,50],[3037,10],[3340,10],[3326,50],[1,50],[3037,10],
[1,50],[1,50],[3037,10],[3340,10],[3326,50],[1,50],[3037,10],[3340,10],[3326,50],[1,50]]);
下载地址:
© 版权声明
THE END
暂无评论内容