[Point Blank] V37 MyInfo - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Регистрация Мнения Справка Пользователи Календарь Все разделы прочитаны
Вернуться   Форум администраторов игровых серверов > MMO > Point Blank (Piercing Blow)

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

Описание темы:need fix inventory and medals

Ответ
Опции темы
Непрочитано 06.02.2018, 14:23   #1
Аватар для nikolen
Пользователь

Автор темы (Топик Стартер) V37 MyInfo

Hello everybody. I have a problem with MyInfo Structure. 2 first medals not work, always 0. i tried every method but not work. 2 last one works. i think this problem comes from inventory codes which i marked with bold. but inventory works. i stuck at here. please someone help me about this.
@PROGRAMMATOR @Awiion

Код:
public class BASE_GET_MYINFO_ACK
extends AuthPacketACK {
    public Player pS;
    public Clan cS;
    public EventVerification ev;
    public ServerSettings srv;
    public int error;
    public List<PlayerInventory> weapon;
    public List<PlayerInventory> chara;
    public List<PlayerInventory> coupon;
    public List<PlayerInventory> new_item;
 
    public BASE_GET_MYINFO_ACK(Player pS, int error) {
        super(2566);
        this.pS = pS;
        this.error = error;
        this.srv = SettingsProperty.gI().st;
        if (pS != null) {
            if (this.srv.christmas && pS.event.christmas == 0) {
                pS.event.christmas = 1;
                this.db.updateChristmas(pS, 1);
            }
            this.checkInventory();
            this.cS = this.db.readCSlan(pS.clan_id);
            this.weapon = pS.getItemByType(1);
            this.chara = pS.getItemByType(2);
            this.coupon = pS.getItemByType(3);
            this.new_item = pS.getItemByType(4);

            EventVerification clone = EventXML.gI().VERIFICATION_NOW();
            if (clone != null && this.srv.verification_active && clone != null && clone.checks > pS.event.checks && this.date.getHourTime(0) != pS.event.check_day) {
                this.ev = EventXML.gI().VERIFICATION_NOW();
            }
        }
    }

    @Override
    public void writeImpl() {
        this.WriteD(this.error);
        if (this.error == 0 && this.pS != null) {
            int i;
            PlayerInventory item;
            this.WriteC(this.pS.client_version);
            this.WriteS(this.pS.name, 33);
            this.WriteD(this.pS.exp);
            this.WriteD(this.pS.rank);
            this.WriteD(this.pS.rank);
            this.WriteD(this.pS.gold);
            this.WriteD(this.pS.cash);
            this.WriteD(this.pS.clan_id);
            this.WriteD(this.pS.role);
            this.WriteQ(this.pS.status());
            this.WriteC(this.pS.pc_cafe);
            this.WriteC(this.pS.tourney_level); //not work
            this.WriteC(this.pS.color);

            this.WriteS(this.cS.name, 17);
            this.WriteC(this.cS.rank);
            this.WriteC(this.cS.total_players);
            this.WriteD(this.cS.logo);
            this.WriteC(this.cS.color);
            this.WriteC(0); //unk
            this.WriteD(0); //unk
            this.WriteD(0); //unk
            this.WriteD(0); //unk

            this.WriteD(this.pS.stats.partidas);
            this.WriteD(this.pS.stats.ganhou);
            this.WriteD(this.pS.stats.perdeu);
            this.WriteD(this.pS.stats.empatou);
            this.WriteD(this.pS.stats.matou);
            this.WriteD(this.pS.stats.headshots);
            this.WriteD(this.pS.stats.morreu);
            this.WriteD(this.pS.stats.partidas);
            this.WriteD(this.pS.stats.matou);
            this.WriteD(this.pS.stats.kitou);
            this.WriteD(this.pS.stats.partidas);
            this.WriteD(this.pS.stats.ganhou);
            this.WriteD(this.pS.stats.perdeu);
            this.WriteD(this.pS.stats.empatou);
            this.WriteD(this.pS.stats.matou);
            this.WriteD(this.pS.stats.headshots);
            this.WriteD(this.pS.stats.morreu);
            this.WriteD(this.pS.stats.partidas);
            this.WriteD(this.pS.stats.matou);
            this.WriteD(this.pS.stats.kitou);

            this.WriteD(this.pS.equipment.char_red);
            this.WriteD(this.pS.equipment.char_blue);
            this.WriteD(this.pS.equipment.char_head);
            this.WriteD(this.pS.equipment.char_beret);
            this.WriteD(this.pS.equipment.char_dino);
            this.WriteD(this.pS.equipment.weapon_primary);
            this.WriteD(this.pS.equipment.weapon_secundary);
            this.WriteD(this.pS.equipment.weapon_melee);
            this.WriteD(this.pS.equipment.weapon_grenade);
            this.WriteD(this.pS.equipment.weapon_special);

            this.WriteH(0);
            this.WriteD(55);
            this.WriteD(55);
            this.WriteS(this.pS.coupon.false_nick, 33);
            this.WriteH(0);
            this.WriteC(0x1F);

            this.WriteC(1); //inventory enable/disable

            //inventory work but medals not
            this.WriteD(this.chara.size());
            this.WriteD(this.weapon.size());
            this.WriteD(this.coupon.size());
            this.WriteD(this.new_item.size());
            for (i = 0; i < this.chara.size(); i++) {
                item = this.chara.get(i);
                this.WriteQ(item.equip != 3 ? item.object : 0);
                this.WriteD(item.item_id);
                this.WriteC(item.equip);
                this.WriteD(item.count);
            }
            for (i = 0; i < this.weapon.size(); i++) {
                item = this.weapon.get(i);
                this.WriteQ(item.equip != 3 ? item.object : 0);
                this.WriteD(item.item_id);
                this.WriteC(item.equip);
                this.WriteD(item.count);
            }
            for (i = 0; i < this.coupon.size(); i++) {
                item = this.coupon.get(i);
                this.WriteQ(item.equip != 3 ? item.object : 0);
                this.WriteD(item.item_id);
                this.WriteC(item.equip);
                this.WriteD(item.count);
            }
           for (i = 0; i < this.new_item.size(); i++) {
                item = this.new_item.get(i);
                this.WriteQ(item.equip != 3 ? item.object : 0);
                this.WriteD(item.item_id);
                this.WriteC(item.equip);
                this.WriteD(item.count);
            }
            this.WriteC(0); //outpost enable/disable
            this.WriteD(30); // medal always 0
            this.WriteD(31); //medal always 0
            this.WriteD(32); //work
            this.WriteD(33); //work
nikolen вне форума Ответить с цитированием
Непрочитано 11.02.2018, 12:06   #2
Аватар для nikolen
Пользователь

Автор темы (Топик Стартер) Re: V37 MyInfo

up
nikolen вне форума Ответить с цитированием
Непрочитано 11.02.2018, 16:19   #3
Аватар для PROGRAMMATOR
Администратор

По умолчанию Re: V37 MyInfo

Why not sniffing on the official server?
__________________
composer require laravel/framework
yarn add vue
PROGRAMMATOR вне форума Отправить сообщение для PROGRAMMATOR с помощью ICQ Отправить сообщение для PROGRAMMATOR с помощью Skype™ Ответить с цитированием
Ответ


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

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

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

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

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
[Point Blank] Вылетает клиент при получение MyInfo slawa560 Point Blank (Piercing Blow) 2 23.08.2017 18:02
[Point Blank] Some can help the struct myinfo Version 39 Exile03 Point Blank (Piercing Blow) 1 21.06.2017 14:20
Point Blank MyInfo ошибка Yusqa Point Blank (Piercing Blow) 2 01.05.2016 11:28


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

Вверх