Vray3d | Дата: Четвер, 14.07.2011, 19:07 | Сообщение # 1 |
Скаут
Группа: V.I.P
|
Патчим Ядро руками Что нам для этого нужно? 1- Сам Патч 2- Сырци ядра 3- MVS 2005/2008/2010 4- Git 5- Глаза и руки Небольшой пример накатывания руками, я покажу вам на примере патча kick_ban_mute_announce --- a/src/server/game/Chat/Commands/Level2.cpp +++ b/src/server/game/Chat/Commands/Level2.cpp @@ -54,8 +54,16 @@ bool ChatHandler::HandleMuteCommand(cons char *mutereason = strtok(NULL, "\r"); std::string mutereasonstr = "No reason"; + std::string announce; if (mutereason != NULL) mutereasonstr = mutereason; + + if(!mutereason) + { + PSendSysMessage("You must enter a reason of mute"); + SetSentErrorMessage(true); + return false; + } Player* target; uint64 target_guid; @@ -89,6 +97,16 @@ bool ChatHandler::HandleMuteCommand(cons std::string nameLink = playerLink(target_name); PSendSysMessage(LANG_YOU_DISABLE_CHAT, nameLink.c_str(), notspeaktime, mutereasonstr.c_str()); + + announce = "The character '"; + announce += nameStr; + announce += "' was muted for "; + announce += delayStr; + announce += " minutes by the character '"; + announce += m_session->GetPlayerName(); + announce += "'. The reason is: "; + announce += mutereason; + HandleAnnounceCommand(announce.c_str()); return true; } @@ -207,6 +225,7 @@ bool ChatHandler::HandleKickPlayerComman { Player* target = NULL; std::string playerName; + std::string announce; if (!extractPlayerTarget((char*)args, &target, NULL, &playerName)) return false; @@ -227,6 +246,14 @@ bool ChatHandler::HandleKickPlayerComman PSendSysMessage(LANG_COMMAND_KICKMESSAGE, playerName.c_str()); target->GetSession()->KickPlayer(); + + announce = "The character '"; + announce += target->GetName(); + announce += "' was kicked by the character '"; + announce += m_session->GetPlayerName(); + announce += "'."; + HandleAnnounceCommand(announce.c_str()); + return true; } --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -2932,6 +2932,7 @@ bool ChatHandler::HandleBanHelper(BanMod return false; std::string nameOrIP = cnameOrIP; + std::string announce; char* duration = strtok (NULL," "); if (!duration || !atoi(duration)) @@ -2991,6 +2992,21 @@ bool ChatHandler::HandleBanHelper(BanMod SetSentErrorMessage(true); return false; } + + if (mode == BAN_CHARACTER) + announce = "The character '"; + else if (mode == BAN_IP) + announce = "The IP '"; + else + announce = "Account '"; + announce += nameOrIP.c_str(); + announce += "' was banned for "; + announce += duration; + announce += " by the character '"; + announce += m_session->GetPlayerName(); + announce += "'. The reason is: "; + announce += reason; + HandleAnnounceCommand(announce.c_str()); return true; } Открываем патч через MVS и видим там строки --(красная строка) удаляем ++(зеленая строка) добавляем Желтая строка - изменяемый файл(путь_) @@ -54,8 +54,16 @@ какие строки изменяються b/src/server/game/Chat/Commands/Level3.cpp путь к изменяемуму файлу Начнем: 1- Открываем патч через MVS(чтоб было удобнее так как там все выделенно цветом) 2- Открываем фаил исходника который нужно изменить Чтоб вам было проще искать в какой строке нужно изменить, можно воспользоваться поиском в программе. Копировать вставить - строки перед -- или ++ найти и откорректировать четко как в патче вписывая строки. ================================================================================================ Видео Мануал патчим Ядро с помощью GIT от Vray3d Видео мануал патчим через GIT и исправляем конфликты. В Мануале пример на патче Warden+AC2 от Arcanum Core Полный софт для компиляции и работы над TrinityCore [Видео_Мануал] скачивание и компиляция ядра TrinityCore
Cборка, настройка,установка любых гейм серверов. Помощь с патчами итд итп. Пишите в ПМ или ICQ636600322. С глупыми вопросами в =====> лес Main Dev TrailBlazer
Сообщение отредактировал Vray3d - Середа, 17.08.2011, 01:33 |
|
|
|
SprinterCore | Дата: Четвер, 14.07.2011, 19:12 | Сообщение # 2 |
Рыцарь
Группа: Пользователи
|
Отличный мануал +
|
|
|
|