Skip to content

Commit

Permalink
[core] Map>Packets>Various A thru M files: Russian to English
Browse files Browse the repository at this point in the history
  • Loading branch information
EpicTaru committed Oct 3, 2023
1 parent 38ae46f commit bd595c0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/map/packets/char_jobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CCharJobsPacket::CCharJobsPacket(CCharEntity* PChar)
ref<uint32>(0x3C) = PChar->health.maxhp;
ref<uint32>(0x40) = PChar->health.maxmp;

ref<uint32>(0x44) = PChar->jobs.unlocked & 1; // первый бит в unlocked отвечает за дополнительную профессию
ref<uint32>(0x44) = PChar->jobs.unlocked & 1; // The first bit in jobs.unlocked is responsible for an additional job

ref<uint16>(0x60) = PChar->m_EquipBlock; // Locked equipment slots
ref<uint16>(0x62) =
Expand Down
2 changes: 1 addition & 1 deletion src/map/packets/char_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ CCharStatsPacket::CCharStatsPacket(CCharEntity* PChar)
ref<uint16>(0x10) = PChar->jobs.exp[PChar->GetMJob()];
ref<uint16>(0x12) = charutils::GetExpNEXTLevel(PChar->jobs.job[PChar->GetMJob()]);

memcpy(data + (0x14), &PChar->stats, 14); // TODO: с merits это не прокатит
memcpy(data + (0x14), &PChar->stats, 14); // TODO: it won't work with merits

ref<uint16>(0x22) = std::clamp<int16>(PChar->getMod(Mod::STR), -999 + PChar->stats.STR, 999 - PChar->stats.STR);
ref<uint16>(0x24) = std::clamp<int16>(PChar->getMod(Mod::DEX), -999 + PChar->stats.DEX, 999 - PChar->stats.DEX);
Expand Down
2 changes: 1 addition & 1 deletion src/map/packets/inventory_assign.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define INV_NORMAL 0x00
#define INV_NODROP 0x05
#define INV_NOSELECT 0x0F
#define INV_LINKSHELL 0x13 // название под большим вопросом
#define INV_LINKSHELL 0x13
#define INV_MANNEQUIN 0x1B // Equipped to the mannequin

class CItem;
Expand Down
2 changes: 1 addition & 1 deletion src/map/packets/key_items.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "basic.h"

// нет какой-либо зависимости между номерами таблиц и типами ключевых предметов
// There is no relationship between table numbers and key item types

enum KEYS_TABLE
{
Expand Down
36 changes: 11 additions & 25 deletions src/map/packets/merit_points_categories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@
#include "entities/charentity.h"

/*
пакет, содержащий информацию об примененных меритах и количестве, необходимом для следующего усиления
информации много, отправляется в трех пакетах. начало у всех стандартное:
Package containing information about the applied merites and the amount required for the next boost
There is a lot of information, sent in three packages. The beginning is standard for everyone:
0x8c 0x80 0x05 0x00 0x3D 0x00 0x00 0x00
далее идут данные в виде структур
Next comes the data in the form of structures
struct
{
unsigned sort // id мерита
unsigned char // необходимое количество меритов для следующего усиления (0 - усиление этого мерита невозможно)
unsigned char // количестов усилений, сделанных персонажем
unsigned sort // Merit id
unsigned char // Required number of merits for the next enhancement (0 - strengthening of this merit is impossible)
unsigned char // Number of enhancements made by the character
};
начало категории кратно 0x40 далее идет прибавление id значения. все id кратны двум
The beginning of the category is a multiple of 0x40, then the id value is added. All ids are multiples of two
количество необходимых меритов для следующего усиления передаются персонажу только при входе в moghouse
The number of required merits for the next enhancement is transferred to the character only when entering the moghouse
*/

/************************************************************************
* *
* Отправляем персонажу информацию о всех merit (5 пакетов) *
* Send the character information about all merits (5 packages) *
* *
************************************************************************/

Expand All @@ -73,7 +73,7 @@ CMeritPointsCategoriesPacket::CMeritPointsCategoriesPacket(CCharEntity* PChar)

/************************************************************************
* *
* Отправляем персонажу информуцию об одном merit *
* Send the character information about one merit *
* *
************************************************************************/

Expand All @@ -86,12 +86,6 @@ CMeritPointsCategoriesPacket::CMeritPointsCategoriesPacket(CCharEntity* PChar, M
ref<uint32>(0x08) = PChar->PMeritPoints->GetMerit(merit)->data;
}

/************************************************************************
* *
* *
* *
************************************************************************/

void CMeritPointsCategoriesPacket::MeritPointsCategoriesPacket(CCharEntity* PChar, uint8 offset)
{
for (uint8 i = 0; i < MAX_MERITS_IN_PACKET; ++i)
Expand All @@ -103,19 +97,11 @@ void CMeritPointsCategoriesPacket::MeritPointsCategoriesPacket(CCharEntity* PCha
{
for (uint8 i = 0; i < MAX_MERITS_IN_PACKET; ++i)
{
(*(Merit_t*)(data + (0x08) + sizeof(uint32) * i)).next = 0; // обнуляем значение next у всех merit
(*(Merit_t*)(data + (0x08) + sizeof(uint32) * i)).next = 0; // Reset the next value for all merits
}
}
}

/************************************************************************
* *
* *
* *
************************************************************************/

// TODO: не помню, зачем я сунул это сюда ((

/*
0x00 0x40 - HP/MP
Expand Down
4 changes: 2 additions & 2 deletions src/map/packets/message_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ CMessageTextPacket::CMessageTextPacket(CBaseEntity* PEntity, uint16 messageID, b
this->setType(0x36);
this->setSize(0x10);

// если в качестве объекта передается персонаж,
// то не будем отображать имя
// if a character is passed as an object,
// then we won't display the name

if (PEntity->objtype == TYPE_PC || !showName)
{
Expand Down

0 comments on commit bd595c0

Please sign in to comment.