08-07-2017, 05:26 PM
i have this error in client connection in java source
i have this error clients connection
|
08-07-2017, 05:26 PM
i have this error in client connection in java source
08-07-2017, 06:35 PM
CM_ENTER - Packet
08-07-2017, 06:43 PM
slawa560 Написал:CM_ENTER - Packet what must fix in this packet CM_ENTER : /* * Java Server Emulator Project Blackout / PointBlank * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * Authors: DarkSkeleton, sjke, Felixx * Copyright © 2013 PBDevâ„¢ */ package ru.pb.game.network.client.packets.client; import ru.pb.game.Application; import ru.pb.game.network.client.packets.ClientPacket; import ru.pb.game.network.client.packets.server.SM_ENTER; import ru.pb.global.enums.item.ItemType; import ru.pb.global.models.Event; import ru.pb.global.models.FriendUpdate; import ru.pb.global.models.Player; import ru.pb.global.models.PlayerItem; import ru.pb.global.service.AccountDaoService; import ru.pb.global.service.PlayerDaoService; import ru.pb.global.utils.DateTimeUtil; import ru.pb.global.utils.NetworkUtil; /** * Ð�еизветный пакет * * @author sjke */ public class CM_ENTER extends ClientPacket { private String login; public CM_ENTER(int opcode) { super(opcode); } @Override public void readImpl() { int length = readC(); // Длинна логина login = readS(length).trim(); // Ð�ккаунт readQ(); // unk readC(); // unk getConnection().setLocalIP(NetworkUtil.parseIp((readB(4)))); // IP аддреÑ� } @Override public void runImpl() { if(getConnection().getAccount() == null) { getConnection().setAccount(AccountDaoService.getInstance().readByLogin(login)); Player player = PlayerDaoService.getInstance().read(getConnection().getAccount().getId()); if(player != null) { getConnection().setPlayer(player); player.setCoupon1(0); player.setCoupon2(0); player.setCoupon3(0); player.setCoupon4(0); player.setCoupon5(0); player.setCouponExp(0); player.setCouponGp(0); player.getConnection().account = getConnection().getAccount(); for(PlayerItem item : player.getEqipment().getItemsByType(ItemType.COUPON)) { int Level = item.getItem().getC_Level(); int Value = item.getItem().getC_Value(); if(Level == 1 && item.getStatus() == 2) player.setCoupon1(player.getCoupon1() + Value); if(Level == 3 && item.getStatus() == 2) player.setCoupon3(player.getCoupon3() + Value); if(Level == 4 && item.getStatus() == 2) player.setCoupon4(player.getCoupon4() + Value); if(Level == 5 && item.getStatus() == 2) player.setCoupon5(player.getCoupon5() + Value); if(Level == 2 && item.getStatus() == 2) player.setCoupon2(player.getCoupon2() + Value); if(Level == 6 && item.getStatus() == 2) { if(Value == 1) { // 200 player.HelpExp200 = 1; } else if(Value == 2) { // 50 player.HelpExp150 = 1; } else if(Value == 3) { // 30 player.HelpExp130 = 1; } } if(Level == 7 && item.getStatus() == 2) { if(Value == 1) { // 200 player.HelpGp200 = 1; } else if(Value == 2) { // 50 player.HelpGp150 = 1; } else if(Value == 3) { // 30 player.HelpGp130 = 1; } } } } } if(getConnection().getPlayer().TotalPlayMinutes == -1) { getConnection().getPlayer().TotalPlayMinutes = -2; for(Event c : Application.play60Min) { if(c.startTime < DateTimeUtil.getDateTime() && c.finishTime > DateTimeUtil.getDateTime()) { getConnection().getPlayer().TotalPlayMinutes = c.time; } } } sendPacket(new SM_ENTER()); FriendUpdate.sendFriendUpdate(getConnection()); } } |
« Предыдущая | Следующая »
|
Возможно похожие темы ... | |||||
Тема | Автор | Ответы | Просмотры | Последний пост | |
UDP3 POSITION ERROR | 13 | 5,331 |
10-10-2018, 09:20 AM Последний пост: ChunkyHunt |
||
need to fix connection | 3 | 2,639 |
06-01-2018, 10:37 PM Последний пост: TomCodder |
||
help me please UDP3 Event Position Error | 14 | 3,950 |
05-24-2018, 05:31 AM Последний пост: PISTOLA |
||
Please someone help me kill xigncode connection | 4 | 2,136 |
05-06-2018, 09:18 PM Последний пост: Yusqa |
||
Help me please UDP3 error bc.log P2P_SUB_HEAD_USER | 0 | 1,373 |
03-25-2018, 06:04 PM Последний пост: bmzproject |
||
help udp 3 error | 1 | 1,562 |
02-03-2018, 06:35 PM Последний пост: blowstom |
||
[Error PXSD] В чем проблема? немогу понять. | 0 | 1,817 |
12-17-2017, 07:49 PM Последний пост: Codex1to |
||
Shop Tag error | 2 | 1,503 |
11-24-2017, 05:22 PM Последний пост: Yusqa |
||
error in java | 6 | 2,334 |
07-06-2017, 09:07 AM Последний пост: TomCodder |
||
[HELP ME] Error ID | 0 | 935 |
12-23-2016, 07:37 AM Последний пост: yGGhz |