03-24-2016, 11:19 AM
hi everybody. this is point blank weapon activate packet. but not work. if someone know what is wrong with these packets please help me.
CM_INVENTORY_EQUIP_NOTUSED
SM_INVENTORY_EQUIP_NOTUSED
SM_INVENTORY_ADD_ITEM
CM_INVENTORY_EQUIP_NOTUSED
Цитата:namespace PBServer.network.Game.packets.clientpackets
{
using PBServer;
using PBServer.network;
using PBServer.network.Game.packets.serverpackets;
using PBServer.network.serverpackets;
using PBServer.src.model.accounts;
using System;
using PBServer.src.managers;
public class opcode_534_REQ : ReceiveBaseGamePacket
{
private int obj_id;
public opcode_534_REQ(GameClient Client, byte[] data)
{
base.makeme(Client, data);
CLogger.getInstance().info_blue(BitConverter.ToString(data));
}
protected internal override void read()
{
base.readH();
this.obj_id = base.readH();
CLogger.getInstance().info("item obj_id: " + this.obj_id);
}
protected internal override void run()
{
if (base.getClient() != null)
{
AccountManager.getInstance().UpdateItemNotUsed(this.obj_id);
base.getClient().sendPacket(new SM_INVENTORY_EQUIP_NOTUSED(this.obj_id)); //535
base.getClient().sendPacket(new SM_INVENTORY_ADD_ITEM(this.obj_id)); //3588
}
}
}
}
SM_INVENTORY_EQUIP_NOTUSED
Цитата:namespace PBServer.network.Game.packets.serverpackets
{
using PBServer;
using System;
public class SM_INVENTORY_EQUIP_NOTUSED : SendBaseGamePacket
{
private long id;
public SM_INVENTORY_EQUIP_NOTUSED(long id)
{
base.makeme();
this.id = id;
}
protected internal override void write()
{
CLogger.getInstance().info("Received: SM_INVENTORY_EQUIP_NOTUSED(535) | " + this.id);
base.writeH(535);
base.writeD(1); // count
base.writeQ(id); //object id - perriot mask
base.writeD(1104003014); //item id - pierrot mask
base.writeD(0); //unk
base.writeC((byte)2); //consumable type
base.writeD(Convert.ToInt32(DateTime.Now.ToString("yyMMddHHmm"))); //quantity - 7 day
}
}
}
SM_INVENTORY_ADD_ITEM
Цитата:namespace PBServer.network.serverpackets
{
using PBServer;
using System;
public class SM_INVENTORY_ADD_ITEM : SendBaseGamePacket
{
private long id;
public SM_INVENTORY_ADD_ITEM(long id)
{
base.makeme();
this.id = id;
}
protected internal override void write()
{
CLogger.getInstance().info("Received: SM_INVENTORY_ADD_ITEM(3588) | " + this.id);
base.writeH(3588);
this.writeC(1); //unk
this.writeC(1); //Chara Items
this.writeC(0); //weapons
this.writeC(0); //coupon
this.writeQ(id); //object id - perriot mask
this.writeD(1104003014); //item id - pierrot mask
this.writeD(0); //unk
this.writeC((byte)2); //consumable type
this.writeD(604800); //quantity - 7 day
}
}
}