[Point Blank] i have this error clients connection - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Регистрация Мнения Справка Сообщество Календарь
Вернуться   Форум администраторов игровых серверов > MMO > Point Blank (Piercing Blow)

Point Blank (Piercing Blow)
Общие вопросы по написанию эмулятора. General questions on developing emulator. При поддержке: Lucera 2 - разработка Java Interlude

Ответ
Опции темы
Непрочитано 07.08.2017, 17:26   #1
Пользователь

Автор темы (Топик Стартер) i have this error clients connection

i have this error in client connection in java source
TomCodder вне форума Ответить с цитированием
Непрочитано 07.08.2017, 18:35   #2
Пользователь

По умолчанию Re: i have this error clients connection

CM_ENTER - Packet
slawa560 вне форума Ответить с цитированием
Непрочитано 07.08.2017, 18:43   #3
Пользователь

Автор темы (Топик Стартер) Re: i have this error clients connection

Цитата:
Сообщение от 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 (C) 2013 PBDev&#226;„&#162;
*/

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;

/**
* &#208;�&#208;µ&#208;&#184;&#208;·&#208;&#178;&#208 ;µ&#209;‚&#208;&#189;&#209;‹&#208;&#185; &#208;&#191;&#208;°&#208;&#186;&#208;µ&#209;‚
*
* @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(); // &#208;”&#208;»&#208;&#184;&#208;&#189;&#208;&#189; &#208;° &#208;»&#208;&#190;&#208;&#179;&#208;&#184;&#208;& #189;&#208;°
login = readS(length).trim(); // &#208;�&#208;&#186;&#208;&#186;&#208;°&#209;ƒ&#208 ;&#189;&#209;‚
readQ(); // unk
readC(); // unk
getConnection().setLocalIP(NetworkUtil.parseIp((re adB(4)))); // IP &#208;°&#208;&#180;&#208;&#180;&#209;€&#208;µ&#209 ;�
}

@Override
public void runImpl() {
if(getConnection().getAccount() == null) {
getConnection().setAccount(AccountDaoService.getIn stance().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.COUPO N)) {
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());
}
}
TomCodder вне форума Ответить с цитированием
Ответ


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
[Помогите] Connection timed out: connect gream Minecraft 1 26.08.2012 18:14
Error "time synchronization poorness caused to block connection" Aleser Сервер 15 17.12.2010 17:23
Пожалуйста, помогите! Unclosed connection! Trace: Gromila Lineage II 3 01.09.2010 23:24
Столкнулся с казусом настройки clients.txt kazactz Сервер 9 26.06.2010 12:22
session key is not correct. Closing connection Lonely_Angel_94 Lineage II 5 22.12.2007 02:44


© 2007–2024 «Форум администраторов игровых серверов»
Защита сайта от DDoS атак — StormWall
Работает на Булке неизвестной версии с переводом от zCarot
Текущее время: 09:09. Часовой пояс GMT +3.

Вверх