Сообщений: 6,450
Тем: 262
Зарегистрирован: Nov 2007
Репутация:
44,165
slawa560, работает в смысле не выкидывает?
И да, в бинаре следует проверить размер заголовка Udp пакета, так как могут отличаться.
Сообщений: 10
Тем: 1
Зарегистрирован: May 2016
Репутация:
2
Hey please help me, I have a Udp2 the PRESTART error on my server C #, do not know much about Udp, someone help me
http://imgur.com/LgqANRx
Код: internal class SM_BATTLE_PRESTARTBATTLE : SendBaseGamePacket
{
private Room _room;
private Account _player;
public SM_BATTLE_PRESTARTBATTLE(Room room, Account p)
{
makeme();
_player = p;
_room = room;
}
protected internal override void write()
{
writeH(3349);
writeD(_room.isBattleInt());
writeD(_player.getSlot());
writeC(2);
writeB(_room.getLeader().publicAdddress());
writeH(29890);
writeB(_room.getLeader().publicAdddress());
writeH(29890);
writeC(0);
writeB(_player.publicAdddress());
writeH(29890);
writeB(_player.publicAdddress());
writeH(29890);
writeC(0);
writeB(IPAddress.Parse("25.17.148.129").GetAddressBytes());
writeU(40000);
_room.getSlot(_player.getSlot()).state = SLOT_STATE.SLOT_STATE_BATTLE_READY;
writeB(new byte[] { 145, 0, 0, 0, 71, 6, 0, 0 });
writeC(0);
writeB(new byte[] { 10, 34, 0, 1, 16, 3, 30, 5, 6, 7, 4, 9, 22, 11, 27, 8, 14, 15, 2, 17, 18, 33, 20, 21, 19, 23, 24, 25, 26, 12, 28, 29, 13, 31, 32 });
}
}
Сообщений: 322
Тем: 6
Зарегистрирован: Nov 2015
Репутация:
505
Henrique,
Код: writeB(new byte[] { 145, 0, 0, 0, 71, 6, 0, 0 });
writeC(0);
writeB(new byte[] { 10, 34, 0, 1, 16, 3, 30, 5, 6, 7, 4, 9, 22, 11, 27, 8, 14, 15, 2, 17, 18, 33, 20, 21, 19, 23, 24, 25, 26, 12, 28, 29, 13, 31, 32 });
}
Код: int32 RoomID
int32 RoomIdx;
byte[35]; Hit
|