• Страница 1 из 1
  • 1
Модератор форума: Dimitro  
Форум » TrinityCore » [TrinityCore] Help » Патч в ядро нужна помощь
Патч в ядро нужна помощь
Nekotinchik
Скаут
Добрый день! Хочу накатить патч на ядро, делаю это впервые... взял патч на трансмог с гитхаба https://github.com/Rochet2....ransmog
 
Положил в папку source\TrinityCore\src\server\scripts\Custom

изменил файл custom_script_loader.cpp на вот это:


Код
/*
 * Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
 *
 * 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 2 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/>.
 */

// This is where scripts' loading functions should be declared:
void AddSC_Transmogrification();

// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddCustomScripts()
{
    AddSC_Transmogrification();
}


В СMake ошибок не было все нормально, дальше я начинаю собираю в VS и мне выдает вот такие 2 ошибки:
1)20>c:\source\trinitycore\src\server\scripts\custom\transmogrifier.cpp(14): fatal error C1083: Не удается открыть файл включение: Transmogrification.h: No such file or directory,

2)22>LINK : fatal error LNK1181: не удается открыть входной файл "..\scripts\Release\scripts.lib"

Если кому не трудно помогите пожалуйста.
Сообщение # 1 написано 21.06.2019 в 13:28
Infernales
Сержант
Переведи:
Цитата Nekotinchik ()
Transmogrification.h: No such file or directory,


Цитата Nekotinchik ()
взял патч на трансмог с гитхаба https://github.com/Rochet2....ransmog


Там специально есть ссылка на diff-файл для автоматического добавления всех изменений в репозиторий TrinityCore через Git.
Сообщение # 2 написано 21.06.2019 в 15:27
Nekotinchik
Скаут
Infernales, а как его установить ? нажать на папку Git bash
и что написать нужно?

Код
$ patch -p1 <1.patch
(Stripping trailing CRs from patch; use --binary to disable.)
patching file sql/custom/characters/2017_05_03_00_characters_transmog.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file sql/custom/characters/2018_05_20_00_characters_transmog.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file sql/custom/world/2017_05_03_00_world_transmog.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/database/Database/Implementation/CharacterDatabase.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/DataStores/DBCStores.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/DataStores/DBCStores.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/Entities/Item/Item.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/Entities/Item/Item.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/Entities/Item/Transmogrification.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/Entities/Item/Transmogrification.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/Entities/Player/Player.cpp
Hunk #3 succeeded at 12200 (offset -1 lines).
Hunk #4 succeeded at 12332 (offset -1 lines).
Hunk #5 succeeded at 23548 (offset -1 lines).
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/Entities/Player/Player.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/Guilds/GuildMgr.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/game/Handlers/SpellHandler.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/CHANGELOG.md
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/README.md
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/Transmogrifier.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/2016_07_15_00_world                    .sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/_README.md
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/characters_update_2                    _1_to_2_2.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/characters_update_2                    _2_to_3_0.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/characters_update_4                    _x_to_5_0.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/characters_update_5                    _x_to_6_1.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/characters_update_6                    _1_to_6_2.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/world_update_3_5_to                    _3_6.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/world_update_4_x_to                    _5_0.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/updates/world_update_5_0_to                    _5_1.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/Transmog/sql/world_NPC.sql
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Custom/custom_script_loader.cpp
Hunk #1 FAILED at 16.
1 out of 1 hunk FAILED -- saving rejects to file src/server/scripts/Custom/custo                    m_script_loader.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/scripts/Spells/spell_generic.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/shared/DataStores/DBCStructure.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/shared/DataStores/DBCfmt.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/server/worldserver/worldserver.conf.dist
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 3990 with fuzz 1.
Сообщение # 3 отредактировано Nekotinchik - Пятница, 21.06.2019, 15:50
Infernales
Сержант
Цитата Nekotinchik ()
а как его установить ? нажать на папку Git bash

Там же есть инструкция...
Цитата Nekotinchik ()
Hunk #1 FAILED at 16.1 out of 1 hunk FAILED -- saving rejects to file src/server/scripts/Custom/custo m_script_loader.cpp.rej

Тут тебе прямым текстом ошибку написало.
На форуме есть куча тем по работе с Git , а так же есть официальная документация.
Сообщение # 4 написано 21.06.2019 в 16:04
Nekotinchik
Скаут
Infernales, Нужно было просто добавить в файл custom_script_loader.cpp  загрузку патча. Спасибо еще раз за твою помощь, я просто новенький в этом деле так что извини что бывают глупые вопросы. Если бы ты еще подсказал как заливать несколько патчей сразу  очень был бы благодарен ,что для этого нужно писать в custom_script_loader.cpp?
Сообщение # 5 отредактировано Nekotinchik - Пятница, 21.06.2019, 16:46
Infernales
Сержант
Цитата Nekotinchik ()
Если бы ты еще подсказал как заливать несколько патчей сразу очень был бы благодарен ,что для этого нужно писать в custom_script_loader.cpp?

Эм... Что? При чём тут применение патчей через Git и изменение файла custom_script_loader.cpp? Что ты вообще хотел сказать этим предложением?
Если надо накатить несколько патчей через Git, то можно их объединить в один файл. Но только стоит учитывать, что в последующих патчах должны
затрагиваться изменения предыдущего патча, если в них изменяются одинаковые файлы.
Сообщение # 6 написано 21.06.2019 в 22:00
Nekotinchik
Скаут
Infernales,  если 2 патча cpp нужно в лоадере писать так? 
Код
/*
 * Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
 *
 * 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 2 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/>.
 */

// This is where scripts' loading functions should be declared:
void AddSC_Patch-1();
void AddSC_Patch-2();

// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddCustomScripts()
{
    AddSC_Patch-1();
    AddSC_Patch-2();
}

 
надеюсь ты понял
Сообщение # 7 написано 23.06.2019 в 09:10
Infernales
Сержант
Nekotinchik, выучи наконец-то определения.
Цитата Nekotinchik ()
если 2 патча скрипта cpp нужно в лоадере писать так?

Если оно будет звучать так, то да - верно.
Сообщение # 8 написано 23.06.2019 в 13:37
Форум » TrinityCore » [TrinityCore] Help » Патч в ядро нужна помощь
  • Страница 1 из 1
  • 1
Поиск: