Port Wow link blockers (group 5): taint log, CMap load progress/hit debug, Rain SW, WowConnection accept, spell trajectory

- Taint logging (TaintEventCallback, GetTaintContext, PrintTaintEvent), real TAINTEVENT layout
- CMap::ComputeMapObjLoadProgress/ComputeDoodadLoadProgress, SetHitTestDebug + World::HitTestDebug
- CMapRenderChunk::RenderSinglePass, Rain SW patter/drop render
- WowConnection::CheckAccept + accepted-socket ctor
- Spell_C missile trajectory prepare/visuals, dest-loc visuals without caster
- SendPendingCast passes TSStackArray<CGUnit_C*> targets like the binary
- Russian declension, survey data, GameTimeSync, mirror timer, guild roster save, spellbook prefetch, small drift fixes

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Saty
2026-10-03 19:27:09 +02:00
co-authored by Claude Opus 5.5
parent 5c9a9c4aac
commit 96e42b7e30
42 changed files with 2427 additions and 74 deletions
+21
View File
@@ -718,6 +718,13 @@ void PassFogCombine::BuildIndices() {
buf->unk_001C = 1;
}
// VERIFY: d096b4ea manual
// OFFSET: 0x008C2020
bool PassDeath::Valid() {
CGxShader* shader = this->m_shaders[this->m_useRect];
return (shader ? shader->Valid() : 0) != 0;
}
// VERIFY: 883cadff manual
// OFFSET: 0x007E87B0
void PassDeath::Execute() {
@@ -745,6 +752,13 @@ void PassDeath::Execute() {
FFX::SetupReset();
}
// VERIFY: 51b35afa manual
// OFFSET: 0x008C2020
bool PassNetherCombine::Valid() {
CGxShader* shader = this->m_pixelShaders[this->m_useRect];
return (shader ? shader->Valid() : 0) != 0;
}
// VERIFY: 74b70bbd manual
// OFFSET: 0x007E8C80
void PassNetherCombine::Execute() {
@@ -777,6 +791,13 @@ void PassNetherCombine::Execute() {
FFX::SetupReset();
}
// VERIFY: ff3f053e manual
// OFFSET: 0x007E8180
bool PassFogCombine::Valid() {
CGxShader* shader = this->m_pixelShaders[this->m_useRect];
return shader && shader->Valid();
}
// VERIFY: 0e25f7e9 manual
// OFFSET: 0x007E9670
void PassFogCombine::Execute() {
@@ -28,6 +28,12 @@ PassFogSeed::~PassFogSeed() {
g_theGxDevicePtr->RemoveDeviceRestoredCallback(PassFogSeed::DeviceRestoredCallback);
}
// VERIFY: da3c8c98 auto
// OFFSET: 0x008A1420
bool PassFogSeed::Valid() {
return true;
}
// VERIFY: 0d91b22f manual
// OFFSET: 0x007E92A0
void PassFogSeed::Execute() {
+52
View File
@@ -175,6 +175,58 @@ void CGameTime::GameTimeUpdate(float elapsed) {
}
}
// VERIFY: 5022ff80 manual
// OFFSET: 0x0076D9A0
void CGameTime::GameTimeSync(const WowTime& time, bool force) {
WowTime newTime = time;
if (this->m_minuteOffset) {
int32_t minutes = newTime.GetHourAndMinutes() + this->m_minuteOffset;
newTime.SetHourAndMinutes(minutes < 0 ? minutes + 1440 : minutes % 1440);
}
if (this->m_dayOffset) {
newTime.AddDays(this->m_dayOffset, false);
}
int32_t days = newTime.GetDaysSinceEpoch() - this->GetDaysSinceEpoch();
int32_t delta = (1440 * days - this->GetHourAndMinutes() + newTime.GetHourAndMinutes()) % 1440;
int32_t behind;
if (force || delta > 0) {
if (delta > 1) {
char newString[1024];
char currentString[1024];
const char* newText = WowTime::WowGetTimeString(&newTime, newString, sizeof(newString));
const char* currentText = WowTime::WowGetTimeString(this, currentString, sizeof(currentString));
DebugLog(0x10, "GameTimeSync: skipping forwards %d game minutes, (current = %s, newtime = %s)", delta, currentText, newText);
}
for (; delta > 0; delta--) {
this->TickMinute();
}
behind = 0;
} else {
behind = -delta;
}
newTime.m_tzHours = time.m_tzHours;
*static_cast<WowTime*>(this) = newTime;
if (!behind) {
return;
}
this->m_elapsedMinutes += behind;
for (int32_t i = behind; i > 0; i--) {
this->TickMinute();
}
DebugLog(0x10, "GameTimeSync: delta=%d, differential=%d, HoursAndMinutes=%d", 0, this->m_elapsedMinutes, this->GetHourAndMinutes());
}
// VERIFY: 580cfeb5 manual
// OFFSET: 0x0076D1D0
void __stdcall CGameTime::GameTimeUnregisterCallback(TIMESTAMPCALLBACK* callback) {
+431
View File
@@ -156,6 +156,155 @@ static const uint16_t s_koreanSyllables[2350] = {
0xD76C, 0xD770, 0xD774, 0xD77C, 0xD77D, 0xD781, 0xD788, 0xD789, 0xD78C, 0xD790, 0xD798, 0xD799, 0xD79B, 0xD79D
};
struct RussianNameInfo {
/* 0000 */ int32_t m_rule;
/* 0004 */ int32_t m_stemLen;
/* 0008 */ uint16_t m_name[1024];
/* 0808 */ int32_t m_hasAltStem;
/* 080C */ int32_t m_altStemLen;
};
struct RussianDeclensionRule {
/* 0000 */ uint16_t m_endings[9][5];
/* 005C */ int32_t m_sex;
/* 0060 */ uint16_t m_suffix[5];
/* 006C */ int32_t m_sets[3];
};
// STATIC: 0x00ADC0A8
static const uint16_t s_russianDeclensionEndings[71][5][5] = {
{ { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x043A, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x043A, 0x0443, 0x0000, 0x0000, 0x0000 }, { 0x043A, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x043A, 0x043E, 0x043C, 0x0000, 0x0000 }, { 0x043A, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x043E, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x043E, 0x043A, 0x0443, 0x0000, 0x0000 }, { 0x043E, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x043E, 0x043A, 0x043E, 0x043C, 0x0000 }, { 0x043E, 0x043A, 0x0435, 0x0000, 0x0000 } },
{ { 0x043A, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x043A, 0x0443, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x0000, 0x0000, 0x0000 }, { 0x043A, 0x043E, 0x043C, 0x0000, 0x0000 }, { 0x043A, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x0443, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x043E, 0x043C, 0x0000 }, { 0x0435, 0x043A, 0x0435, 0x0000, 0x0000 } },
{ { 0x0435, 0x043A, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x0443, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x043E, 0x043C, 0x0000 }, { 0x0435, 0x043A, 0x0435, 0x0000, 0x0000 } },
{ { 0x044C, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x044C, 0x043A, 0x0443, 0x0000, 0x0000 }, { 0x044C, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x044C, 0x043A, 0x043E, 0x043C, 0x0000 }, { 0x044C, 0x043A, 0x0435, 0x0000, 0x0000 } },
{ { 0x0435, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x0443, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x043E, 0x043C, 0x0000 }, { 0x0435, 0x043A, 0x0435, 0x0000, 0x0000 } },
{ { 0x0439, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0439, 0x043A, 0x0443, 0x0000, 0x0000 }, { 0x0439, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0439, 0x043A, 0x043E, 0x043C, 0x0000 }, { 0x0439, 0x043A, 0x0435, 0x0000, 0x0000 } },
{ { 0x0435, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x0443, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x043A, 0x043E, 0x043C, 0x0000 }, { 0x0435, 0x043A, 0x0435, 0x0000, 0x0000 } },
{ { 0x0439, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0439, 0x0446, 0x0443, 0x0000, 0x0000 }, { 0x0439, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0439, 0x0446, 0x0435, 0x043C, 0x0000 }, { 0x0439, 0x0446, 0x0435, 0x0000, 0x0000 } },
{ { 0x0446, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0446, 0x0443, 0x0000, 0x0000, 0x0000 }, { 0x0446, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0446, 0x043E, 0x043C, 0x0000, 0x0000 }, { 0x0446, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x0446, 0x0443, 0x0000, 0x0000 }, { 0x0435, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x0446, 0x043E, 0x043C, 0x0000 }, { 0x0435, 0x0446, 0x0435, 0x0000, 0x0000 } },
{ { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x043D, 0x0438, 0x0000, 0x0000 }, { 0x0435, 0x043D, 0x0438, 0x0000, 0x0000 }, { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043D, 0x0435, 0x043C, 0x0000 }, { 0x0435, 0x043D, 0x0438, 0x0000, 0x0000 } },
{ { 0x043E, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0443, 0x0000, 0x0000 }, { 0x043E, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x044B, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0000, 0x0000, 0x0000 } },
{ { 0x043E, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0435, 0x043C, 0x0000, 0x0000 }, { 0x043E, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x043E, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0443, 0x0000, 0x0000 }, { 0x043E, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x044B, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0000, 0x0000, 0x0000 } },
{ { 0x044B, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x044B, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x044B, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x044B, 0x0435, 0x043C, 0x0000, 0x0000 }, { 0x044B, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0443, 0x0000, 0x0000 }, { 0x0435, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x0438, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0000, 0x0000, 0x0000 } },
{ { 0x0438, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0438, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x0438, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0438, 0x0435, 0x043C, 0x0000, 0x0000 }, { 0x0438, 0x0438, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 } },
{ { 0x043E, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0439, 0x0000, 0x0000, 0x0000 } },
{ { 0x0430, 0x0438, 0x0000, 0x0000, 0x0000 }, { 0x0430, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0430, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x0430, 0x0435, 0x0439, 0x0000, 0x0000 }, { 0x0430, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 } },
{ { 0x044F, 0x0438, 0x0000, 0x0000, 0x0000 }, { 0x044F, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x044F, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x044F, 0x0435, 0x0439, 0x0000, 0x0000 }, { 0x044F, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x043E, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0443, 0x0000, 0x0000 }, { 0x043E, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x044B, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0000, 0x0000, 0x0000 } },
{ { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0435, 0x043C, 0x0000, 0x0000 }, { 0x043E, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x043E, 0x0438, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0435, 0x0439, 0x0000, 0x0000 }, { 0x043E, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0443, 0x0000, 0x0000 }, { 0x0435, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x0438, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0435, 0x043C, 0x0000, 0x0000 }, { 0x0435, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x0438, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0435, 0x0439, 0x0000, 0x0000 }, { 0x0435, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044C, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044C, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x044B, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x044B, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x0433, 0x043E, 0x0441, 0x044F }, { 0x0435, 0x043C, 0x0443, 0x0441, 0x044F }, { 0x0435, 0x0433, 0x043E, 0x0441, 0x044F }, { 0x0438, 0x043C, 0x0441, 0x044F, 0x0000 }, { 0x0435, 0x043C, 0x0441, 0x044F, 0x0000 } },
{ { 0x0435, 0x0433, 0x043E, 0x0441, 0x044F }, { 0x0435, 0x043C, 0x0443, 0x0441, 0x044F }, { 0x0435, 0x0433, 0x043E, 0x0441, 0x044F }, { 0x0438, 0x043C, 0x0441, 0x044F, 0x0000 }, { 0x0435, 0x043C, 0x0441, 0x044F, 0x0000 } },
{ { 0x0435, 0x0439, 0x0441, 0x044F, 0x0000 }, { 0x0435, 0x0439, 0x0441, 0x044F, 0x0000 }, { 0x0443, 0x044E, 0x0441, 0x044F, 0x0000 }, { 0x0435, 0x0439, 0x0441, 0x044F, 0x0000 }, { 0x0435, 0x0439, 0x0441, 0x044F, 0x0000 } },
{ { 0x0438, 0x0445, 0x0441, 0x044F, 0x0000 }, { 0x0438, 0x043C, 0x0441, 0x044F, 0x0000 }, { 0x0438, 0x0445, 0x0441, 0x044F, 0x0000 }, { 0x0438, 0x043C, 0x0438, 0x0441, 0x044F }, { 0x0438, 0x0445, 0x0441, 0x044F, 0x0000 } },
{ { 0x043E, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0443, 0x0000, 0x0000 }, { 0x043E, 0x0433, 0x043E, 0x0000, 0x0000 }, { 0x0438, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x043E, 0x043C, 0x0000, 0x0000, 0x0000 } },
{ { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0451, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0451, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x043D, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x043D, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x043D, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x043D, 0x0435, 0x043C, 0x0000, 0x0000 }, { 0x043D, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0435, 0x043D, 0x044F, 0x0000, 0x0000 }, { 0x0435, 0x043D, 0x044E, 0x0000, 0x0000 }, { 0x0435, 0x043D, 0x044F, 0x0000, 0x0000 }, { 0x0435, 0x043D, 0x0435, 0x043C, 0x0000 }, { 0x0435, 0x043D, 0x0435, 0x0000, 0x0000 } },
{ { 0x0435, 0x043D, 0x0438, 0x0000, 0x0000 }, { 0x0435, 0x043D, 0x0438, 0x0000, 0x0000 }, { 0x0435, 0x043D, 0x044C, 0x0000, 0x0000 }, { 0x0435, 0x043D, 0x044C, 0x044E, 0x0000 }, { 0x0435, 0x043D, 0x0438, 0x0000, 0x0000 } },
{ { 0x043D, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x043D, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x043D, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x043D, 0x0435, 0x043C, 0x0000, 0x0000 }, { 0x043D, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0451, 0x043D, 0x044F, 0x0000, 0x0000 }, { 0x0451, 0x043D, 0x044E, 0x0000, 0x0000 }, { 0x0451, 0x043D, 0x044F, 0x0000, 0x0000 }, { 0x0451, 0x043D, 0x0435, 0x043C, 0x0000 }, { 0x0451, 0x043D, 0x0435, 0x0000, 0x0000 } },
{ { 0x0451, 0x043D, 0x0438, 0x0000, 0x0000 }, { 0x0451, 0x043D, 0x0438, 0x0000, 0x0000 }, { 0x0451, 0x043D, 0x044C, 0x0000, 0x0000 }, { 0x0451, 0x043D, 0x044C, 0x044E, 0x0000 }, { 0x0451, 0x043D, 0x0438, 0x0000, 0x0000 } },
{ { 0x0442, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0442, 0x044E, 0x0000, 0x0000, 0x0000 }, { 0x0442, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0442, 0x0435, 0x043C, 0x0000, 0x0000 }, { 0x0442, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x043E, 0x0442, 0x0438, 0x0000, 0x0000 }, { 0x043E, 0x0442, 0x0438, 0x0000, 0x0000 }, { 0x043E, 0x0442, 0x044C, 0x0000, 0x0000 }, { 0x043E, 0x0442, 0x044C, 0x044E, 0x0000 }, { 0x043E, 0x0442, 0x0438, 0x0000, 0x0000 } },
{ { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x043C, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 } },
{ { 0x044C, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x044C, 0x043A, 0x0443, 0x0000, 0x0000 }, { 0x044C, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x044C, 0x043A, 0x043E, 0x043C, 0x0000 }, { 0x044C, 0x043A, 0x0435, 0x0000, 0x0000 } },
{ { 0x0451, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0451, 0x043A, 0x0443, 0x0000, 0x0000 }, { 0x0451, 0x043A, 0x0430, 0x0000, 0x0000 }, { 0x0451, 0x043A, 0x043E, 0x043C, 0x0000 }, { 0x0451, 0x043A, 0x0435, 0x0000, 0x0000 } },
{ { 0x044C, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x044C, 0x0446, 0x0443, 0x0000, 0x0000 }, { 0x044C, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x044C, 0x0446, 0x0435, 0x043C, 0x0000 }, { 0x044C, 0x0446, 0x0435, 0x0000, 0x0000 } },
{ { 0x0435, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x0446, 0x0443, 0x0000, 0x0000 }, { 0x0435, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0435, 0x0446, 0x043E, 0x043C, 0x0000 }, { 0x0435, 0x0446, 0x0435, 0x0000, 0x0000 } },
{ { 0x044C, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x044C, 0x0446, 0x0443, 0x0000, 0x0000 }, { 0x044C, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x044C, 0x0446, 0x043E, 0x043C, 0x0000 }, { 0x044C, 0x0446, 0x0435, 0x0000, 0x0000 } },
{ { 0x0451, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0451, 0x0446, 0x0443, 0x0000, 0x0000 }, { 0x0451, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0451, 0x0446, 0x043E, 0x043C, 0x0000 }, { 0x0451, 0x0446, 0x0435, 0x0000, 0x0000 } },
{ { 0x0446, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0446, 0x0443, 0x0000, 0x0000, 0x0000 }, { 0x0446, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0446, 0x043E, 0x043C, 0x0000, 0x0000 }, { 0x0446, 0x0435, 0x0000, 0x0000, 0x0000 } },
{ { 0x0451, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0451, 0x0446, 0x0443, 0x0000, 0x0000 }, { 0x0451, 0x0446, 0x0430, 0x0000, 0x0000 }, { 0x0451, 0x0446, 0x043E, 0x043C, 0x0000 }, { 0x0451, 0x0446, 0x0435, 0x0000, 0x0000 } },
};
// STATIC: 0x00ADCE88
static const RussianDeclensionRule s_russianDeclensionRules[55] = {
{ { { 0x0438, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044B, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044D, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0430, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0, 71, 71 } },
{ { { 0x0430, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x044D, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x044F, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0451, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x0439, 0x0000, 0x0000, 0x0000, 0x0000 }, { 1, 0, 71 } },
{ { { 0x0430, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0435, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0443, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x044D, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x044E, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x044F, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x0439, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0, 1, 71 } },
{ { { 0x043E, 0x043A, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x043E, 0x043A, 0x0000, 0x0000, 0x0000 }, { 2, 3, 0 } },
{ { { 0x0447, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0448, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x0435, 0x043A, 0x0000, 0x0000, 0x0000 }, { 4, 5, 0 } },
{ { { 0x0447, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x0435, 0x043A, 0x0000, 0x0000, 0x0000 }, { 4, 6, 0 } },
{ { { 0x043B, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x043C, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x043D, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0440, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0441, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0442, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0435, 0x043A, 0x0000, 0x0000, 0x0000 }, { 8, 7, 0 } },
{ { { 0x0430, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0435, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0438, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0443, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0451, 0x0435, 0x043A, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0435, 0x043A, 0x0000, 0x0000, 0x0000 }, { 9, 10, 0 } },
{ { { 0x0430, 0x0435, 0x0446, 0x0000, 0x0000 }, { 0x0435, 0x0435, 0x0446, 0x0000, 0x0000 }, { 0x0438, 0x0435, 0x0446, 0x0000, 0x0000 }, { 0x043E, 0x0435, 0x0446, 0x0000, 0x0000 }, { 0x0443, 0x0435, 0x0446, 0x0000, 0x0000 }, { 0x044B, 0x0435, 0x0446, 0x0000, 0x0000 }, { 0x044D, 0x0435, 0x0446, 0x0000, 0x0000 }, { 0x044E, 0x0435, 0x0446, 0x0000, 0x0000 }, { 0x044F, 0x0435, 0x0446, 0x0000, 0x0000 } }, 2, { 0x0435, 0x0446, 0x0000, 0x0000, 0x0000 }, { 11, 0, 71 } },
{ { { 0x0435, 0x0446, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0435, 0x0446, 0x0000, 0x0000, 0x0000 }, { 12, 13, 0 } },
{ { { 0x043A, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0433, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0445, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 14, 0, 71 } },
{ { { 0x0438, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 15, 0, 71 } },
{ { { 0x0435, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0451, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 16, 0, 71 } },
{ { { 0x0435, 0x043C, 0x044F, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 17, 0, 71 } },
{ { { 0x043E, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x043E, 0x0439, 0x0000, 0x0000, 0x0000 }, { 18, 19, 0 } },
{ { { 0x044B, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x044B, 0x0439, 0x0000, 0x0000, 0x0000 }, { 20, 21, 0 } },
{ { { 0x0438, 0x0439, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0438, 0x0439, 0x0000, 0x0000, 0x0000 }, { 22, 23, 52 } },
{ { { 0x0447, 0x0430, 0x044F, 0x0000, 0x0000 }, { 0x0449, 0x0430, 0x044F, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0430, 0x044F, 0x0000, 0x0000, 0x0000 }, { 24, 0, 71 } },
{ { { 0x0430, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0430, 0x044F, 0x0000, 0x0000, 0x0000 }, { 25, 26, 0 } },
{ { { 0x044F, 0x044F, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x044F, 0x044F, 0x0000, 0x0000, 0x0000 }, { 27, 28, 0 } },
{ { { 0x043E, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x043E, 0x0435, 0x0000, 0x0000, 0x0000 }, { 29, 30, 0 } },
{ { { 0x043E, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x043E, 0x0435, 0x0000, 0x0000, 0x0000 }, { 29, 31, 0 } },
{ { { 0x0435, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x0435, 0x0435, 0x0000, 0x0000, 0x0000 }, { 32, 33, 0 } },
{ { { 0x0435, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x0435, 0x0435, 0x0000, 0x0000, 0x0000 }, { 32, 34, 0 } },
{ { { 0x043E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x043E, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0, 35, 71 } },
{ { { 0x0438, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 37, 0, 0 } },
{ { { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0, 38, 71 } },
{ { { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x044F, 0x0000, 0x0000, 0x0000, 0x0000 }, { 39, 0, 71 } },
{ { { 0x044C, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x044C, 0x0000, 0x0000, 0x0000, 0x0000 }, { 40, 41, 0 } },
{ { { 0x044C, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x044C, 0x0000, 0x0000, 0x0000, 0x0000 }, { 41, 40, 0 } },
{ { { 0x0447, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0448, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0449, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0436, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 42, 0, 71 } },
{ { { 0x0446, 0x0430, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 43, 0, 71 } },
{ { { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0430, 0x0000, 0x0000, 0x0000, 0x0000 }, { 44, 0, 71 } },
{ { { 0x0447, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0449, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0436, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0448, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0436, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 45, 46, 0 } },
{ { { 0x0447, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0449, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0436, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0448, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0436, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0, 45, 46 } },
{ { { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 47, 0, 71 } },
{ { { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0, 47, 71 } },
{ { { 0x0438, 0x0439, 0x0441, 0x044F, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0438, 0x0439, 0x0441, 0x044F, 0x0000 }, { 48, 0, 71 } },
{ { { 0x0435, 0x0435, 0x0441, 0x044F, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0435, 0x0435, 0x0441, 0x044F, 0x0000 }, { 49, 0, 71 } },
{ { { 0x0430, 0x044F, 0x0441, 0x044F, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0430, 0x044F, 0x0441, 0x044F, 0x0000 }, { 50, 0, 71 } },
{ { { 0x0438, 0x0435, 0x0441, 0x044F, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0438, 0x0435, 0x0441, 0x044F, 0x0000 }, { 51, 0, 71 } },
{ { { 0x0451, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0451, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0, 53, 71 } },
{ { { 0x0435, 0x043D, 0x044C, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x0435, 0x043D, 0x044C, 0x0000, 0x0000 }, { 54, 55, 0 } },
{ { { 0x0435, 0x043D, 0x044C, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x0435, 0x043D, 0x044C, 0x0000, 0x0000 }, { 0, 54, 56 } },
{ { { 0x0451, 0x043D, 0x044C, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x0451, 0x043D, 0x044C, 0x0000, 0x0000 }, { 57, 58, 0 } },
{ { { 0x0451, 0x043D, 0x044C, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x0451, 0x043D, 0x044C, 0x0000, 0x0000 }, { 0, 57, 59 } },
{ { { 0x043E, 0x0442, 0x044C, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 0, { 0x043E, 0x0442, 0x044C, 0x0000, 0x0000 }, { 60, 61, 0 } },
{ { { 0x043E, 0x0442, 0x044C, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 1, { 0x043E, 0x0442, 0x044C, 0x0000, 0x0000 }, { 61, 60, 0 } },
{ { { 0x0449, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0448, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0447, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0446, 0x0435, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0435, 0x0000, 0x0000, 0x0000, 0x0000 }, { 62, 0, 71 } },
{ { { 0x043B, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x043C, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x043D, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x0440, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x0441, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x0442, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0451, 0x043A, 0x0000, 0x0000, 0x0000 }, { 63, 64, 0 } },
{ { { 0x0430, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x0435, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x0438, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x0443, 0x0451, 0x043A, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0451, 0x043A, 0x0000, 0x0000, 0x0000 }, { 9, 10, 0 } },
{ { { 0x0430, 0x0451, 0x0446, 0x0000, 0x0000 }, { 0x0435, 0x0451, 0x0446, 0x0000, 0x0000 }, { 0x0438, 0x0451, 0x0446, 0x0000, 0x0000 }, { 0x043E, 0x0451, 0x0446, 0x0000, 0x0000 }, { 0x0443, 0x0451, 0x0446, 0x0000, 0x0000 }, { 0x044B, 0x0451, 0x0446, 0x0000, 0x0000 }, { 0x044D, 0x0451, 0x0446, 0x0000, 0x0000 }, { 0x044E, 0x0451, 0x0446, 0x0000, 0x0000 }, { 0x044F, 0x0451, 0x0446, 0x0000, 0x0000 } }, 2, { 0x0451, 0x0446, 0x0000, 0x0000, 0x0000 }, { 11, 0, 71 } },
{ { { 0x043B, 0x0435, 0x0446, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0435, 0x0446, 0x0000, 0x0000, 0x0000 }, { 65, 66, 0 } },
{ { { 0x043B, 0x0451, 0x0446, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0451, 0x0446, 0x0000, 0x0000, 0x0000 }, { 67, 68, 0 } },
{ { { 0x0451, 0x0446, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 } }, 2, { 0x0451, 0x0446, 0x0000, 0x0000, 0x0000 }, { 69, 70, 0 } },
};
// STATIC: 0x00D37E10
static bool unk_D37E10;
@@ -973,6 +1122,215 @@ int32_t GetNameDeclensions(int32_t locale, char* declensions, const char* name,
return 0;
}
// VERIFY: e5fa55cb manual
// OFFSET: 0x0076DD90
int32_t ValidateCharacterNameDeclension(int32_t locale, const char* name, const char* declension) {
if (locale != 8) {
return 1;
}
int32_t result = ValidateCharacterNameConst(8, declension, true, true, false, false, 5);
if (!result) {
return IsRussianDeclensionValid(name, declension) ? 0 : 16;
}
return result;
}
// VERIFY: 1233d9c5 manual
// OFFSET: 0x0076DE70
static void GetNameInfo(const char* name, RussianNameInfo* info, int32_t sex) {
int32_t length = SStrLenUTF8(name);
memset(info->m_name, 0, sizeof(info->m_name));
SUniConvertUTF8to16(info->m_name, 1024, name, 0x7FFFFFFF, nullptr, nullptr);
for (int32_t i = 0; i < 1024; i++) {
info->m_name[i] = ToLower(info->m_name[i]);
}
info->m_stemLen = length;
info->m_rule = sex == 1 ? 36 : 35;
info->m_hasAltStem = 0;
int32_t bestMatch = 0;
for (int32_t r = 0; r < 55; r++) {
const RussianDeclensionRule* rule = &s_russianDeclensionRules[r];
if (rule->m_sex != 2 && sex != 2 && sex != rule->m_sex) {
continue;
}
int32_t matched = 0;
int32_t i = 0;
for (int32_t k = 0; k < 9; k++) {
matched = 0;
int32_t pos = length - 1;
const uint16_t* c = &info->m_name[pos];
for (i = 4; i >= 0; i--) {
if (pos < 0) {
break;
}
uint16_t ending = rule->m_endings[k][i];
if (ending) {
uint16_t ch = *c;
pos--;
c--;
if (ending != ch) {
break;
}
matched++;
}
}
if (matched > 0 && i < 0) {
break;
}
}
if (matched <= 0 || i >= 0 || matched <= bestMatch) {
continue;
}
bestMatch = matched;
info->m_rule = r;
int32_t pos = length - 1;
const uint16_t* c = &info->m_name[pos];
for (int32_t j = 4; j >= 0; j--) {
if (pos < 0) {
break;
}
uint16_t suffix = rule->m_suffix[j];
if (suffix) {
uint16_t ch = *c;
pos--;
c--;
if (suffix != ch) {
break;
}
}
}
info->m_stemLen = pos + 1;
}
int32_t alt = 0;
if (length <= 2) {
return;
}
if (info->m_rule == 36 || info->m_rule == 35) {
alt = length - 2;
} else {
if (length <= 3 || info->m_name[length - 1] != 0x44C) {
return;
}
bool found = false;
for (int32_t k = 0; k < 9 && !found; k++) {
for (int32_t i = 4; i >= 0; i--) {
uint16_t ending = s_russianDeclensionRules[info->m_rule].m_endings[k][i];
if (ending && i == 0 && ending == 0x44C) {
alt = length - 3;
found = true;
break;
}
}
}
}
if (alt > 0) {
uint16_t c = info->m_name[alt];
if (c == 0x435 || c == 0x43E || c == 0x451) {
info->m_altStemLen = alt;
info->m_hasAltStem = 1;
}
}
}
// VERIFY: 02e75d1a manual
// OFFSET: 0x0076E0B0
static int32_t FormatCase(char* declensions, uint32_t set, const RussianNameInfo* info) {
int32_t id = s_russianDeclensionRules[info->m_rule].m_sets[set];
uint16_t buffer[1024];
if (id == 71) {
for (int32_t i = 0; i < 5; i++) {
declensions[i * 1024] = '\0';
}
return 0;
}
if (id == 0) {
int32_t length = 1;
for (const uint16_t* c = &info->m_name[1]; *c; c++) {
buffer[length++] = *c;
}
buffer[0] = ToUpper(info->m_name[0]);
if (length == 1024) {
length = 1023;
}
buffer[length] = 0;
for (int32_t i = 0; i < 5; i++) {
SUniConvertUTF16to8(&declensions[i * 1024], 1024, buffer, 1024, nullptr, nullptr);
}
return 1;
}
for (int32_t i = 0; i < 5; i++) {
int32_t length = 0;
if (info->m_stemLen > 0) {
memcpy(buffer, info->m_name, info->m_stemLen * sizeof(uint16_t));
length = info->m_stemLen;
}
for (int32_t j = 0; j < 5 && length < 1024; j++) {
uint16_t ending = s_russianDeclensionEndings[id][i][j];
if (!ending) {
break;
}
buffer[length++] = ending;
}
buffer[0] = ToUpper(buffer[0]);
if (length == 1024) {
length = 1023;
}
buffer[length] = 0;
SUniConvertUTF16to8(&declensions[i * 1024], 1024, buffer, 1024, nullptr, nullptr);
}
return 1;
}
// VERIFY: a66e9458 auto
// OFFSET: 0x0076E270
int32_t RussianNameNeedsDeclensions(const char* name) {
@@ -981,6 +1339,79 @@ int32_t RussianNameNeedsDeclensions(const char* name) {
return IsRussian(c);
}
// VERIFY: 407be8ad manual
// OFFSET: 0x0076E2B0
int32_t GetNumRussianNameDeclensionSets(const char* name, int32_t sex) {
RussianNameInfo info;
info.m_rule = 35;
info.m_stemLen = 0;
info.m_name[0] = 0;
info.m_hasAltStem = 0;
info.m_altStemLen = 0;
GetNameInfo(name, &info, sex);
const RussianDeclensionRule* rule = &s_russianDeclensionRules[info.m_rule];
int32_t count = rule->m_sets[0] != 71;
if (rule->m_sets[1] != 71) {
count++;
}
if (rule->m_sets[2] != 71) {
count++;
}
return count;
}
// VERIFY: 42c2d552 auto
// OFFSET: 0x0076E330
int32_t GetRussianNameDeclensions(char* declensions, const char* name, int32_t sex, uint32_t set) {
if (set > 2) {
return 0;
}
RussianNameInfo info;
info.m_stemLen = 0;
info.m_name[0] = 0;
info.m_hasAltStem = 0;
info.m_altStemLen = 0;
info.m_rule = 35;
GetNameInfo(name, &info, sex);
return FormatCase(declensions, set, &info);
}
// VERIFY: f13e815d auto
// OFFSET: 0x0076E390
bool IsRussianDeclensionValid(const char* name, const char* declension) {
RussianNameInfo info;
info.m_rule = 35;
info.m_stemLen = 0;
info.m_name[0] = 0;
info.m_hasAltStem = 0;
info.m_altStemLen = 0;
GetNameInfo(name, &info, 2);
uint16_t wide[1024];
SUniConvertUTF8to16(wide, 1024, declension, 0x7FFFFFFF, nullptr, nullptr);
int32_t stem = info.m_hasAltStem ? info.m_altStemLen : info.m_stemLen;
int32_t i = 0;
for (; i < stem; i++) {
if (info.m_name[i] != ToLower(wide[i])) {
return false;
}
}
while (wide[i]) {
i++;
}
return i - stem <= 5;
}
// VERIFY: febf9d45 auto
// OFFSET: 0x007E1030
bool IsRussian(uint16_t c) {
+2
View File
@@ -44,5 +44,7 @@ int32_t GetNumRussianNameDeclensionSets(const char* name, int32_t sex);
int32_t GetRussianNameDeclensions(char* declensions, const char* name, int32_t sex, uint32_t set);
uint32_t GetNumNameDeclensionSets(int32_t locale, const char* name, int32_t sex);
int32_t GetNameDeclensions(int32_t locale, char* declensions, const char* name, int32_t sex, uint32_t set);
int32_t ValidateCharacterNameDeclension(int32_t locale, const char* name, const char* declension);
bool IsRussianDeclensionValid(const char* name, const char* declension);
#endif
@@ -803,6 +803,13 @@ int32_t Script_IsMacClient(lua_State* L) {
return 1;
}
// VERIFY: 31b85cc7 auto
// OFFSET: 0x00510B90
int32_t Script_IsLinuxClient(lua_State* L) {
lua_pushnil(L);
return 1;
}
// VERIFY: f53e291b auto
// OFFSET: 0x004DD610
int32_t Script_GetMovieResolution(lua_State* L) {
+288 -8
View File
@@ -40,6 +40,7 @@
#include "WoW/Source/Ui/ContainerFrame.h"
#include "WoW/Source/UIUtil/Cursor.h"
#include "WoW/Source/UIUtil/InputControl.h"
#include "WoW/Source/Object/ObjectClient/Effect_C.h"
#include "WoW/Source/Object/ObjectClient/Missile_C.h"
#include "WoW/Source/DB/Rec/SpellCategoryRec.h"
#include "WoW/Source/WorldClient/World.h"
@@ -7616,7 +7617,90 @@ static bool ValidateSpellTarget(CGUnit_C* caster, const SpellRec* spell, uint32_
return false;
}
// VERIFY: 48f3382c manual
// VERIFY: d3128f11 manual
// OFFSET: 0x00809F80
int32_t Spell_C_PrepareMissileTrajectoryCast(CGUnit_C* caster, PendingSpellCast* cast, const SpellRec* spell, const TSStackArray<CGUnit_C*>* targets, float* pitch, float* speed) {
if (caster->IsUpdatingMissileTrajectory()) {
Spell_C_SpellFailed(cast, spell, 105, -1, -1, false);
return 0;
}
int32_t instant = SpellRec::GetCastTime(spell, caster->m_unit->m_unitFieldPetnumber != 0, 0, 1) <= 0;
SpellVisualRec visualRec;
const SpellVisualRec* visual = caster->GetAppropriateSpellVisual(spell, visualRec, 0, 0);
SpellVisualKitRec* kit = g_spellVisualKitDB.GetRecord(visual ? visual->m_castKit : 0);
int32_t playNow = 0;
if (caster->m_castSpellId || cast->unk_0139 || !instant || !visual || !visual->m_hasMissile) {
instant = 0;
} else {
instant = 1;
playNow = kit && kit->m_animID > 0 && !(visual->m_flags & 0x4);
cast->m_data.m_castFlags |= 0x20000;
cast->unk_0139 = 1;
}
if (playNow) {
if (s_delayedTrajectoryCast || (kit && kit->m_animID >= 0 && caster->unk_0FA4 == kit->m_animID)) {
Spell_C_SpellFailed(cast, spell, 105, -1, -1, false);
return 0;
}
cast->m_data.m_targetFlags |= 0x60;
cast->m_data.m_sourcePos = C3Vector(0.0f, 0.0f, 0.0f);
cast->m_data.m_destPos = C3Vector(0.0f, 0.0f, 0.0f);
cast->m_data.m_elevation = 0.0f;
cast->m_data.unk_0120 = 1.0f;
if (visual->m_flags & 0x20) {
caster->AttachPrecastMissileModel(visual, cast->m_data.m_castCount);
}
Spell_C_PlayMissileTrajectoryCastVisuals(caster, cast, spell, visual, kit, targets, 1.0f);
s_delayedTrajectoryCast = cast;
return 0;
}
C3Vector impact(0.0f, 0.0f, 0.0f);
C3Vector launch(0.0f, 0.0f, 0.0f);
float time;
if (!caster->ComputeMissileTrajectory(spell, pitch, speed, &launch, &impact, &time, nullptr, nullptr, 0)) {
ConsoleWrite("Could not compute missile trajectory", DEFAULT_COLOR);
Spell_C_SpellFailed(cast, spell, 32, -1, -1, false);
return 0;
}
float bytes;
uint32_t latency;
ClientServices::Connection()->GetNetStats(bytes, bytes, latency);
float arrival = time + latency * 0.001f * 0.5f + 0.2f;
float limit = time * 1.3f;
if (limit < arrival) {
arrival = limit;
}
cast->m_data.m_targetFlags |= 0x60;
cast->m_data.m_sourcePos = launch;
cast->m_data.m_destPos = impact;
cast->m_data.m_elevation = *pitch;
cast->m_data.unk_0120 = *speed;
if (instant) {
Spell_C_PlayMissileTrajectoryCastVisuals(caster, cast, spell, visual, kit, targets, arrival);
caster->ReleaseMissiles();
return 1;
}
if (cast->unk_0139) {
caster->RecordMissileTrajectoryUpdate(cast->m_data.m_castCount, &impact, *pitch, *speed, arrival);
}
return 1;
}
// VERIFY: 1c2888dd auto
// OFFSET: 0x0080AC90
void Spell_C::SendPendingCast(PendingSpellCast* cast, bool hideVisuals) {
WOWGUID castItem = cast->m_data.m_castItem == cast->m_data.m_caster ? WOWGUID{ 0 } : cast->m_data.m_castItem;
@@ -7653,26 +7737,25 @@ void Spell_C::SendPendingCast(PendingSpellCast* cast, bool hideVisuals) {
SpellRec spell;
g_spellDB.GetRecord(cast->m_data.m_spellId, &spell);
CGUnit_C** targets = static_cast<CGUnit_C**>(alloca(sizeof(CGUnit_C*) * 2));
uint32_t count = 0;
TSStackArray<CGUnit_C*> targets(static_cast<CGUnit_C**>(alloca(sizeof(CGUnit_C*) * 2)), 2, 0);
bool casterIncluded = false;
for (uint32_t i = 0; i < sizeof(spell.m_implicitTargetA) / sizeof(spell.m_implicitTargetA[0]); i++) {
if (spell.m_implicitTargetA[i] == 1 || spell.m_implicitTargetB[i] == 1) {
count = 1;
targets[0] = caster;
targets.m_count = 1;
targets.m_data[0] = caster;
casterIncluded = true;
break;
}
}
if (cast->m_data.m_objectTarget) {
targets[count++] = static_cast<CGUnit_C*>(ClntObjMgrObjectPtr(cast->m_data.m_objectTarget, TYPEMASK_UNIT, __FILE__, __LINE__));
targets.m_data[targets.m_count++] = static_cast<CGUnit_C*>(ClntObjMgrObjectPtr(cast->m_data.m_objectTarget, TYPEMASK_UNIT, __FILE__, __LINE__));
}
int32_t reason;
if (!ValidateSpellTarget(caster, &spell, count, targets, &reason, casterIncluded) || (cast->m_data.m_itemTarget && !(cast->m_data.m_targetFlags & 0x1000) && !CheckItemRequirement(cast, &spell, cast->m_data.m_itemTarget, &reason))) {
if (!ValidateSpellTarget(caster, &spell, targets.m_count, targets.m_data, &reason, casterIncluded) || (cast->m_data.m_itemTarget && !(cast->m_data.m_targetFlags & 0x1000) && !CheckItemRequirement(cast, &spell, cast->m_data.m_itemTarget, &reason))) {
Spell_C_SpellFailed(cast, &spell, reason, -1, -1, false);
return;
}
@@ -7813,7 +7896,7 @@ void Spell_C::SendPendingCast(PendingSpellCast* cast, bool hideVisuals) {
float pitch;
float speed;
if (!Spell_C_PrepareMissileTrajectoryCast(caster, cast, &spell, &count, &pitch, &speed)) {
if (!Spell_C_PrepareMissileTrajectoryCast(caster, cast, &spell, &targets, &pitch, &speed)) {
return;
}
@@ -9054,6 +9137,36 @@ void LaunchMissileVisual(const TSStackArray<WOWGUID>& hits, const TSStackArray<W
unit->CreateMissile(&none, data, ammoDisplayId, ammoInventoryType, 1, 1, 0, visual, spell->m_id, &targets, &reasons, &reflects, delay);
}
// VERIFY: 0b671995 manual
// OFFSET: 0x00800DD0
void Spell_C_PlayMissileTrajectoryCastVisuals(CGUnit_C* unit, PendingSpellCast* cast, const SpellRec* spell, const SpellVisualRec* visual, const SpellVisualKitRec* kit, const TSStackArray<CGUnit_C*>* targets, float time) {
if (kit) {
PlaySpellVisuaKitData data(spell, kit, 0);
unit->PlaySpellVisualKit(data);
}
TSStackArray<WOWGUID> guids(static_cast<WOWGUID*>(alloca(sizeof(WOWGUID) * targets->m_count)), targets->m_count, 0);
guids.m_count = targets->m_count;
for (uint32_t i = 0; i < targets->m_count; i++) {
guids.m_data[i] = targets->m_data[i]->m_obj->m_guid;
}
TSStackArray<WOWGUID> misses(nullptr, 0, 0);
TSStackArray<uint32_t> missReasons(nullptr, 0, 0);
TSStackArray<uint32_t> reflectResults(nullptr, 0, 0);
if (!visual) {
return;
}
if (spell->m_attributesExD & 0x40000) {
LaunchMissileVisual(guids, misses, unit, spell, visual, 0, 0, cast ? &cast->m_data : nullptr, missReasons, reflectResults, static_cast<uint32_t>(time * 1000.0f));
} else {
CreateMissilesForTargets(guids, unit, spell, visual, 0, 0, cast ? &cast->m_data : nullptr, nullptr, nullptr, static_cast<uint32_t>(time * 1000.0f));
}
}
// VERIFY: 7426a6ef auto
// OFFSET: 0x00804420
void Spell_C_ClearPetCooldowns() {
@@ -9166,6 +9279,173 @@ void PlayImpactVisual(const SpellRec* spell, const TSStackArray<WOWGUID>& target
}
}
// VERIFY: 3a61b823 manual
// OFFSET: 0x00802040
void PlayImpactVisualOnTarget(const SpellRec* spell, const SpellVisualRec* visual, CGUnit_C* target, CGUnit_C* caster) {
TSStackArray<WOWGUID> targets(static_cast<WOWGUID*>(alloca(sizeof(WOWGUID))), 1, 1);
targets.m_data[0] = target->m_obj->m_guid;
PlayImpactVisual(spell, targets, caster, visual);
}
// VERIFY: f73e5797 manual
// OFFSET: 0x008022D0
void Spell_C_PlayDestLocVisualsWithoutCaster(NotifyDestLocSpellCastData* data) {
SpellRec spell;
if (!g_spellDB.GetRecord(data->m_spellId, &spell)) {
return;
}
SpellVisualRec* visual = g_spellVisualDB.GetRecord(spell.m_spellVisualID[0]);
if (!visual) {
return;
}
SpellVisualKitRec* kit = g_spellVisualKitDB.GetRecord(visual->m_instantAreaKit);
if (kit) {
uint32_t flags = spell.m_spellMissileID > 0 ? 0x402010 : 0x2010;
SpellVisualEffectNameRec* effectName;
if (kit->m_baseEffect && (effectName = g_spellVisualEffectNameDB.GetRecord(kit->m_baseEffect)) != nullptr) {
CEffect* effect = new (SMemAlloc(sizeof(CEffect), __FILE__, __LINE__, 0)) CEffect();
effect->InitAtPosition(data->m_spellId, kit, effectName, flags, &CGObject_C::EffectOnceHandler, &data->m_destPosition, 0, data->m_destTarget);
effect->Release();
flags = (flags & ~0x10u) | 0x400;
}
if (kit->m_worldEffect && (effectName = g_spellVisualEffectNameDB.GetRecord(kit->m_worldEffect)) != nullptr) {
CEffect* effect = new (SMemAlloc(sizeof(CEffect), __FILE__, __LINE__, 0)) CEffect();
effect->InitAtPosition(data->m_spellId, kit, effectName, flags, &CGObject_C::EffectOnceHandler, &data->m_destPosition, 0, data->m_destTarget);
effect->Release();
}
}
CMissile* missiles = nullptr;
if (visual->m_hasMissile && visual->m_missileModel && spell.m_speed > 0.0f) {
float scale = 1.0f;
CM2Model* model = nullptr;
if (visual->m_missileModel < -5 || visual->m_missileModel >= 0) {
SpellVisualEffectNameRec* effectName = g_spellVisualEffectNameDB.GetRecord(visual->m_missileModel);
if (effectName && *effectName->m_fileName) {
model = World::s_m2Scene->CreateModel(effectName->m_fileName, 0x40);
scale = effectName->m_scale;
}
}
if (!model) {
model = World::s_m2Scene->CreateModel("Spells\\ErrorCube.mdx", 0);
}
CMissile* missile = CMissile::NewMissile();
missile->m_model = model;
missile->m_casterGuid = data->m_caster;
missile->m_targetGuid = WOWGUID();
missile->m_spellID = data->m_spellId;
missile->m_castID = data->m_castCount;
missile->m_speed = spell.m_speed;
missile->m_baseSpeed = spell.m_speed;
missile->m_hitResult = 0;
missile->m_missReason = 0;
missile->m_flags = 1;
missile->m_scale = scale;
missile->m_soundKitID = visual->m_missileSound;
missile->m_impactPos = data->m_destPosition;
missile->m_attachmentID = -1;
float height = visual->m_missileFollowGroundHeight * 0.001f;
if (height <= 0.25f) {
height = 0.25f;
}
missile->m_groundOffset = height;
float rate = visual->m_missileFollowGroundDropSpeed * 0.001f;
if (rate <= 0.01f) {
rate = 0.01f;
}
missile->m_followGroundRate = rate;
missile->m_followGroundStart = fclamp(0.001f * visual->m_missileFollowGroundApproach, 0.0f, 1.0f);
missile->m_motionFlags = visual->m_missileFollowGroundFlags;
if (visual->m_missileFollowGroundFlags & 1) {
missile->m_flags |= 0x7800;
}
int32_t missileCount = 1;
if (visual->m_missileMotion) {
missile->m_flags |= 0xB800;
missile->InstallMotionScriptFunction(visual->m_missileMotion);
SpellMissileMotionRec* motion = g_spellMissileMotionDB.GetRecord(visual->m_missileMotion);
if (motion && motion->m_missileCount >= 1) {
missileCount = motion->m_missileCount;
}
}
missile->m_castTime = OsGetAsyncTimeMs();
missile->SetReadyToFire(&missiles);
if (data->unk_0030 > 0.0f) {
missile->m_pitch = data->m_elevation;
missile->m_trajectorySpeed = data->unk_0030;
missile->m_arrivalTime = data->unk_0034 + missile->m_castTime;
missile->m_flags |= 0x10800;
}
missile->unk_0114 = missileCount;
if (missileCount > 1) {
missile->unk_0110 = 0;
for (int32_t i = 1; i < missileCount; i++) {
missile = CMissile::CopyMissile(missile);
missile->unk_0110 = i;
missile->SetReadyToFire(&missiles);
}
}
}
if (!missiles) {
SpellVisualKitRec* impactKit = g_spellVisualKitDB.GetRecord(visual->m_impactAreaKit);
if (!impactKit) {
return;
}
uint32_t delay = OsGetAsyncTimeMs() + data->unk_0034;
uint32_t flags = spell.m_spellMissileID > 0 ? 0x402010 : 0x2010;
SpellVisualEffectNameRec* effectName;
if (impactKit->m_baseEffect && (effectName = g_spellVisualEffectNameDB.GetRecord(impactKit->m_baseEffect)) != nullptr) {
CEffect* effect = new (SMemAlloc(sizeof(CEffect), __FILE__, __LINE__, 0)) CEffect();
effect->InitAtPosition(data->m_spellId, impactKit, effectName, flags, &CGObject_C::EffectOnceHandler, &data->m_destPosition, delay, data->m_destTarget);
effect->Release();
flags = (flags & ~0x10u) | 0x400;
}
if (impactKit->m_worldEffect && (effectName = g_spellVisualEffectNameDB.GetRecord(impactKit->m_worldEffect)) != nullptr) {
CEffect* effect = new (SMemAlloc(sizeof(CEffect), __FILE__, __LINE__, 0)) CEffect();
effect->InitAtPosition(data->m_spellId, impactKit, effectName, flags, &CGObject_C::EffectOnceHandler, &data->m_destPosition, delay, data->m_destTarget);
effect->Release();
}
}
while (missiles) {
if (missiles->m_model) {
missiles->m_model->m_fadeAlpha = 1.0f;
}
missiles->FireMissiles(&data->m_destLocation);
}
}
// VERIFY: 7d12c6fb auto
// OFFSET: 0x007FE500
PendingSpellCast* Spell_C_GetDelayedTrajectoryCast() {
+2 -3
View File
@@ -255,7 +255,7 @@ void Spell_C_Destroy();
void Spell_C_Initialize();
PendingSpellCast* CreatePendingSpellCast(bool assignCastCount);
PendingSpellCast* GetPendingSpellCast(uint8_t castCount, int32_t spellId, const WOWGUID& caster);
void Spell_C_PlayMissileTrajectoryCastVisuals(CGUnit_C* unit, PendingSpellCast* cast, const SpellRec* spell, const SpellVisualRec* visual, const SpellVisualKitRec* kit, int32_t* a6, float a7);
void Spell_C_PlayMissileTrajectoryCastVisuals(CGUnit_C* unit, PendingSpellCast* cast, const SpellRec* spell, const SpellVisualRec* visual, const SpellVisualKitRec* kit, const TSStackArray<CGUnit_C*>* targets, float time);
PendingSpellCast* FindPendingSpellCast(const WOWGUID& castItem, PendingSpellCast* fallback, uint8_t castCount, int32_t spellId, const WOWGUID& caster);
void ReleasePendingSpellCast(PendingSpellCast* cast);
void StartSpellCastVisuals(CGUnit_C* unit, PendingSpellCast* cast, const SpellRec* spell, int32_t castTime, bool hidden);
@@ -299,7 +299,6 @@ void SpellRegisterScriptFunctions();
void SpellUnregisterScriptFunctions();
bool SpellIsTrackingAura(const SpellRec* spell);
bool SpellHasAuraEffect(const SpellRec* spell, int32_t aura);
bool SpellIsCallCompanion(const SpellRec* spell);
void Spell_C_ExpireDestLocSpellCasts(uint32_t time);
void SpellSetFeedPetSpell(int32_t spellId);
@@ -323,7 +322,7 @@ void SpellMissingItemsCallback(int32_t itemId, const WOWGUID& guid, void* param,
void GetCustomSpellFailedString(char* buffer, uint32_t size, int32_t customError);
void Spell_C_PetSpellFailedUpdateCooldowns(int32_t spellId);
void Spell_C_ClearInTransitList();
int32_t Spell_C_PrepareMissileTrajectoryCast(CGUnit_C* caster, PendingSpellCast* cast, const SpellRec* spell, uint32_t* count, float* pitch, float* speed);
int32_t Spell_C_PrepareMissileTrajectoryCast(CGUnit_C* caster, PendingSpellCast* cast, const SpellRec* spell, const TSStackArray<CGUnit_C*>* targets, float* pitch, float* speed);
uint32_t Spell_C_EncodeSequenceIntoMissileTrajectory(uint32_t* pitch, uint32_t* speed, uint32_t* source, uint32_t* dest);
ItemSubClassRec* FindAnyItemSubclassRec(int32_t classId, int32_t subclassMask);
void ShowPetSpellFailed(PendingSpellCast* cast, const SpellRec* spell, int32_t reason, int32_t misc1, int32_t misc2);
@@ -40,6 +40,14 @@ static void GuildTabardCallback(int32_t guildID, const WOWGUID& guid, void* para
delete corpseGuid;
}
// VERIFY: 9eb9d9be auto
// OFFSET: 0x0070CBA0
void CGCorpse_C::SetStorage(uint32_t* storage, uint32_t* saved) {
this->CGObject_C::SetStorage(storage, saved);
this->m_corpse = reinterpret_cast<CGCorpseData*>(storage + OBJECT_END);
this->m_corpseMirror = saved + CGObject::TotalFieldsSaved();
}
// VERIFY: 9d2370ce manual
// OFFSET: 0x00706430
CGCorpse_C::CGCorpse_C(uint32_t time, const CClientObjCreate& create) : CGObject_C(time, create), m_passenger(create.m_move.m_status.m_transportGuid, create.m_move.m_status.m_transportPosition, this->m_obj->m_guid), m_component(nullptr), m_groundNormal(0.0f, 0.0f, 1.0f), m_corpseFlags(0), m_selectionRadius(0.0f), m_lootEffect(nullptr) {
@@ -273,7 +273,7 @@ void CGUnit_C::StopMissileTrajectoryTargeting() {
s_trajectoryTargetGuid = WOWGUID();
}
// VERIFY: 865fca67 auto
// VERIFY: d51d83e9 auto
// OFFSET: 0x006FE7E0
void CGUnit_C::UpdateMissileTrajectory() {
if (!this->m_missileTrajectoryCastId || !this->m_missileTrajectoryStart || this->m_missileTrajectoryReleased) {
@@ -303,8 +303,8 @@ void CGUnit_C::UpdateMissileTrajectory() {
cast->m_data.m_elevation = 0.0f;
cast->m_data.m_destPos = C3Vector(0.0f, 0.0f, 0.0f);
cast->m_data.unk_0120 = 1.0f;
int32_t visuals = 0;
Spell_C_PlayMissileTrajectoryCastVisuals(this, cast, &spell, visual, kit, &visuals, 1.0f);
TSStackArray<CGUnit_C*> targets(static_cast<CGUnit_C**>(alloca(0)), 0, 0);
Spell_C_PlayMissileTrajectoryCastVisuals(this, cast, &spell, visual, kit, &targets, 1.0f);
this->m_missileTrajectoryReleased = cast->m_data.m_castCount;
cast->unk_0139 = 1;
} else {
@@ -1276,7 +1276,7 @@ int32_t CGUnit_C::ComputeMissileTrajectory(const SpellRec* spell, float* pitch,
return 1;
}
// VERIFY: 623f3f06 manual
// VERIFY: 2fb23803 manual
// OFFSET: 0x006FD6B0
void CGUnit_C::SendFinalMissileTrajectoryUpdate() {
SpellRec spell;
@@ -1339,8 +1339,8 @@ void CGUnit_C::SendFinalMissileTrajectoryUpdate() {
SpellVisualRec visualRec;
const SpellVisualRec* visual = this->GetAppropriateSpellVisual(&spell, visualRec, 0, 0);
SpellVisualKitRec* kit = g_spellVisualKitDB.GetRecord(visual ? visual->m_castKit : 0);
int32_t visuals = 0;
Spell_C_PlayMissileTrajectoryCastVisuals(this, cast, &spell, visual, kit, &visuals, arrival);
TSStackArray<CGUnit_C*> targets(static_cast<CGUnit_C**>(alloca(0)), 0, 0);
Spell_C_PlayMissileTrajectoryCastVisuals(this, cast, &spell, visual, kit, &targets, arrival);
this->ReleaseMissiles();
}
}
+55 -5
View File
@@ -6,11 +6,6 @@
#include "Engine/Source/lua-5.1/src/lua.h"
#include "WoW/Source/Ui/QuestLog.h"
int32_t Script_SetMergeThreshold(lua_State* L);
int32_t Script_SetNumSplinePoints(lua_State* L);
int32_t Script_GetTooltipIndex(lua_State* L);
int32_t Script_GetNumTooltips(lua_State* L);
// VERIFY: 59c6acd1 manual
// OFFSET: 0x0058E800
static int32_t Script_EnableSmoothing(lua_State* L) {
@@ -27,6 +22,38 @@ static int32_t Script_EnableMerging(lua_State* L) {
return 0;
}
// VERIFY: 12799c8d manual
// OFFSET: 0x0058E8A0
static int32_t Script_SetMergeThreshold(lua_State* L) {
CGQuestPOIFrame* frame = static_cast<CGQuestPOIFrame*>(FrameScript_GetObjectThis(L, CGQuestPOIFrame::GetObjectType()));
double threshold = lua_tonumber(L, 2);
if (threshold < 0.1f) {
threshold = 0.1f;
} else if (threshold > 0.5f) {
threshold = 0.5f;
}
frame->m_mergeThreshold = threshold;
return 0;
}
// VERIFY: 8c983187 manual
// OFFSET: 0x0058E920
static int32_t Script_SetNumSplinePoints(lua_State* L) {
CGQuestPOIFrame* frame = static_cast<CGQuestPOIFrame*>(FrameScript_GetObjectThis(L, CGQuestPOIFrame::GetObjectType()));
int32_t points = lua_tointeger(L, 2);
if (points < 8) {
points = 8;
} else if (points > 30) {
points = 30;
}
frame->m_numSplinePoints = points;
return 0;
}
// VERIFY: b26f7e69 manual
// OFFSET: 0x0058E990
static int32_t Script_UpdateQuestPOI(lua_State* L) {
@@ -57,6 +84,29 @@ void CGQuestPOIFrame::DestroyScriptMetaTable() {
CGQuestPOIFrame::s_metatable = LUA_NOREF;
}
// VERIFY: 2b3e96b0 manual
// OFFSET: 0x0058EA50
static int32_t Script_GetTooltipIndex(lua_State* L) {
CGQuestPOIFrame* frame = static_cast<CGQuestPOIFrame*>(FrameScript_GetObjectThis(L, CGQuestPOIFrame::GetObjectType()));
uint32_t index = lua_tointeger(L, 2) - 1;
if (index > 3) {
lua_pushinteger(L, 0);
} else {
lua_pushinteger(L, frame->m_mouseOverObjectives[index]);
}
return 1;
}
// VERIFY: bd59236e manual
// OFFSET: 0x0058EAC0
static int32_t Script_GetNumTooltips(lua_State* L) {
CGQuestPOIFrame* frame = static_cast<CGQuestPOIFrame*>(FrameScript_GetObjectThis(L, CGQuestPOIFrame::GetObjectType()));
lua_pushinteger(L, frame->m_mouseOverCount);
return 1;
}
// VERIFY: 4ad94ed6 auto
// OFFSET: 0x0058EB00
void CGQuestPOIFrame::CreateScriptMetaTable() {
-1
View File
@@ -429,7 +429,6 @@ bool ChatParserParseText(const char* text, char* buffer, uint32_t size);
bool InebriatedParseText(const char* text, char* buffer, uint32_t size, float drunkness);
int32_t QuestParserParseText(const char* text, char* buffer, uint32_t size, const WOWGUID& guid, const char* name, int32_t a6);
int32_t Script_JoinChannelByName(lua_State* L);
void ChatRegisterScriptFunctions();
void ChatUnregisterScriptFunctions();
+6
View File
@@ -2340,6 +2340,12 @@ static int32_t JoinChannelFromScript(lua_State* L, int32_t permanent) {
return 2;
}
// VERIFY: 31cbcc26 auto
// OFFSET: 0x0050DAA0
static int32_t Script_JoinChannelByName(lua_State* L) {
return JoinChannelFromScript(L, 0);
}
// VERIFY: c8a46eac auto
// OFFSET: 0x0050DAA0
static int32_t Script_JoinTemporaryChannel(lua_State* L) {
+79
View File
@@ -1,4 +1,5 @@
#include "DanceStudio.h"
#include "WoW/Source/Ui/GameUI.h"
#include "WoW/Source/WowSvcs/WowSvcsClient/ClientServices.h"
#include "Engine/Source/Base/CDataStore.h"
#include "WoW/Source/ObjectMgrClient/ObjectMgrClient.h"
@@ -19,6 +20,84 @@ uint64_t CGDanceStudio::m_learnedDanceMoves;
// STATIC: 0x00BEB638
static TSHashTable<KNOWNDANCES, HASHKEY_STRI> s_knownDances;
// VERIFY: 5e35e0a7 manual
// OFFSET: 0x00576730
int32_t Packet_SMSG_NOTIFY_DANCE(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
uint32_t flags;
msg->Get(flags);
uint32_t error = 0;
uint32_t danceId = 0;
uint32_t unk = 0;
char name[128];
if (flags & 8) {
msg->Get(error);
} else {
msg->Get(danceId);
msg->GetString(name, 0x7FFFFFFF);
msg->Get(unk);
}
if (flags & 1) {
KNOWNDANCES* dance = s_knownDances.Ptr(name);
if (!dance) {
dance = s_knownDances.New(name, 0, 0);
}
dance->m_id = danceId;
dance->unk_001C = unk;
}
if (flags & 2) {
KNOWNDANCES* dance = s_knownDances.m_fulllist.Head();
while (dance) {
KNOWNDANCES* next = s_knownDances.Next(dance);
if (dance->m_id == danceId) {
s_knownDances.Delete(dance);
}
dance = next;
}
dance = s_knownDances.New(name, 0, 0);
dance->m_id = danceId;
dance->unk_001C = unk;
g_danceCache.Invalidate(danceId);
}
if (flags & 4) {
KNOWNDANCES* dance = s_knownDances.m_fulllist.Head();
while (dance) {
KNOWNDANCES* next = s_knownDances.Next(dance);
if (dance->m_id == danceId) {
s_knownDances.Delete(dance);
}
dance = next;
}
g_danceCache.Invalidate(danceId);
}
if (flags & 8) {
if (error == 0) {
CGGameUI::DisplayError(ERR_DANCE_CREATE_DUPLICATE);
} else if (error == 1) {
CGGameUI::DisplayError(ERR_DANCE_SAVE_FAILED);
} else if (error == 2) {
CGGameUI::DisplayError(ERR_DANCE_DELETE_FAILED);
}
}
return 1;
}
// VERIFY: 166fac44 auto
// OFFSET: 0x00576A90
void CGDanceStudio::InitializeGame() {
-1
View File
@@ -44,7 +44,6 @@ class CGDanceStudio {
static bool HasDance(const char* name);
};
int32_t Script_PlayDance(lua_State* L);
void PlayDance(const char* name);
#endif
+18
View File
@@ -2,6 +2,24 @@
#include <cstdint>
#include "Engine/Source/FrameScript/FrameScript.h"
#include "Engine/Source/FrameScript/FrameScript_Object.h"
#include "Engine/Source/lua-5.1/src/lauxlib.h"
#include "Engine/Source/lua-5.1/src/lua.h"
// VERIFY: 3ffb6962 auto
// OFFSET: 0x005761F0
static int32_t Script_PlayDance(lua_State* L) {
if (!lua_isstring(L, 1)) {
luaL_error(L, "Usage: PlayDance(\"dance name\")");
}
const char* name = lua_tolstring(L, 1, nullptr);
if (name) {
PlayDance(name);
}
return 0;
}
// STATIC: 0x00ACE834
static FrameScript_Method s_ScriptFunctions[] = {
+227 -4
View File
@@ -981,8 +981,8 @@ WOWGUID CGGameUI::m_cursorItem;
// STATIC: 0x00BD0774
CGTooltip* CGGameUI::m_gameTooltip;
// STATIC: 0x00BD0C24
static int32_t s_unk_BD0C24;
// STATIC: 0x00BD0C0C
static TAINTEVENT s_lastTaintEvent;
// STATIC: 0x00BD0C40
static TSHashTable<TAINTEVENT, HASHKEY_STR> s_taintEvents;
@@ -4366,6 +4366,74 @@ void CGGameUI::ClearInteractTarget(const WOWGUID& guid, int32_t a2) {
CGGameUI::CloseInteraction();
}
// VERIFY: 03e32957 manual
// OFFSET: 0x00519A50
int32_t CGGameUI::OnMirrorTimerEvent(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
if (msgId == SMSG_START_MIRROR_TIMER) {
uint32_t type;
uint32_t value;
uint32_t maxValue;
uint32_t scale;
uint8_t paused;
uint32_t spellId;
msg->Get(type);
msg->Get(value);
msg->Get(maxValue);
msg->Get(scale);
msg->Get(paused);
msg->Get(spellId);
FrameScript_SignalEvent(SCRIPT_EVENT_MIRROR_TIMER_START, "%s%d%d%d%d%s", MirrorTimerTypeToken(type), value, maxValue, scale, paused, GetMirrorTimerLabel(type, spellId));
if (type == 0) {
CGTutorial::TriggerTutorial(26);
} else if (type == 1) {
CGTutorial::TriggerTutorial(28);
}
if (type <= 2) {
MirrorTimerInfo* info = &CGGameUI::m_mirrorTimerInfo[type];
info->m_type = type;
info->m_value = value;
info->m_maxValue = maxValue;
info->m_scale = scale;
info->m_paused = paused;
info->m_spellId = spellId;
CGGameUI::m_mirrorTimerInfo[type].unk_0018 = OsGetAsyncTimeMs();
}
return 1;
}
if (msgId == SMSG_PAUSE_MIRROR_TIMER) {
uint32_t type;
uint8_t paused;
msg->Get(type);
msg->Get(paused);
FrameScript_SignalEvent(SCRIPT_EVENT_MIRROR_TIMER_PAUSE, "%s%d", MirrorTimerTypeToken(type), paused);
return 1;
}
if (msgId == SMSG_STOP_MIRROR_TIMER) {
uint32_t type;
msg->Get(type);
FrameScript_SignalEvent(SCRIPT_EVENT_MIRROR_TIMER_STOP, "%s", MirrorTimerTypeToken(type));
if (type <= 2) {
MirrorTimerInfo* info = &CGGameUI::m_mirrorTimerInfo[type];
info->m_type = 3;
info->m_value = 0;
info->m_maxValue = 0;
info->m_scale = 0;
info->m_paused = 0;
info->m_spellId = 0;
info->unk_0018 = 0;
}
}
return 1;
}
// VERIFY: 692a29c7 auto
// OFFSET: 0x00519CA0
AreaTableRec* CGGameUI::GetCurrentSubzoneRec() {
@@ -7229,7 +7297,162 @@ void CGGameUI::StartCinematic(int32_t cinematic) {
}
}
// VERIFY: a01598ea manual
// VERIFY: 3373886b auto
// OFFSET: 0x005125E0
static void GetTaintContext(TaintStackFrame* frame, char* buffer, uint32_t size) {
char name[1024];
if (frame->m_objectName) {
if (frame->m_debug.name) {
SStrPrintf(name, sizeof(name), "%s:%s", frame->m_objectName, frame->m_debug.name);
} else if (*frame->m_debug.source == '*') {
SStrPrintf(name, sizeof(name), "%s:%s", frame->m_objectName, frame->m_debug.source + 2);
frame->m_debug.source = "";
} else {
name[0] = '\0';
}
frame->m_debug.name = name;
}
if (*frame->m_debug.source == '@') {
frame->m_debug.source++;
}
const char* source = frame->m_debug.source;
if (*source && *source != '=') {
if (frame->m_debug.name && *frame->m_debug.name) {
SStrPrintf(buffer, size, "%s:%d %s()", source, frame->m_debug.currentline, frame->m_debug.name);
} else {
SStrPrintf(buffer, size, "%s:%d", source, frame->m_debug.currentline);
}
} else if (frame->m_debug.name && *frame->m_debug.name) {
SStrPrintf(buffer, size, "%s()", frame->m_debug.name);
} else {
*buffer = '\0';
}
}
// VERIFY: b1647a49 manual
// OFFSET: 0x00518920
static void PrintTaintEvent(TAINTEVENT* event) {
char context[1024];
char text[4096];
if (event->m_stack.m_count) {
GetTaintContext(&event->m_stack.m_data[0], context, sizeof(context));
} else {
SStrCopy(context, "UNKNOWN", sizeof(context));
}
switch (event->m_type) {
case 1:
SStrPrintf(text, sizeof(text), "Global variable %s tainted by %s - %s", event->m_name, event->m_taint, context);
DebugLog("%s\n", text);
SLogWrite(s_taintLog, "%s", text);
break;
case 2:
SStrPrintf(text, sizeof(text), "Execution tainted by %s while reading %s - %s", event->m_taint, event->m_name, context);
DebugLog("%s\n", text);
SLogWrite(s_taintLog, "%s", text);
break;
case 3:
SStrPrintf(text, sizeof(text), "An action was blocked because of taint from %s - %s", event->m_taint, context);
DebugLog("%s\n", text);
SLogWrite(s_taintLog, "%s", text);
break;
case 4:
SStrPrintf(text, sizeof(text), "An action was blocked in combat because of taint from %s - %s", event->m_taint, context);
DebugLog("%s\n", text);
SLogWrite(s_taintLog, "%s", text);
break;
}
for (uint32_t i = 1; i < event->m_stack.m_count; i++) {
GetTaintContext(&event->m_stack.m_data[i], context, sizeof(context));
if (context[0]) {
SStrPrintf(text, sizeof(text), " %s", context);
DebugLog("%s\n", text);
SLogWrite(s_taintLog, "%s", text);
}
}
}
// VERIFY: 6ec27ac0 manual
// OFFSET: 0x0052A650
void TaintEventCallback(lua_State* L, int32_t event, const char* name, const char* taint) {
if (taint == g_macroTaint) {
taint = "MACRO_TAINT";
}
if (g_taintLogCVar->m_intValue == 1 && (event == 3 || event == 4) && s_lastTaintEvent.m_type == 2 && s_lastTaintEvent.m_taint == taint) {
TAINTEVENT* global = s_taintEvents.Ptr(s_lastTaintEvent.m_name);
if (global) {
PrintTaintEvent(global);
}
PrintTaintEvent(&s_lastTaintEvent);
}
TAINTEVENT* record;
if (event == 1) {
record = s_taintEvents.Ptr(name);
if (!record) {
record = s_taintEvents.New(name, 0, 0);
}
} else {
record = &s_lastTaintEvent;
}
record->m_type = event;
record->m_name = name;
record->m_taint = taint;
record->m_stack.m_count = 0;
lua_Debug ar;
if (lua_getstack(L, 0, &ar)) {
int32_t level = 1;
do {
const char* objectName = nullptr;
lua_getinfo(L, "Sln", &ar);
if ((*ar.source == '*' || !SStrCmp(ar.namewhat, "method", STORM_MAX_STR)) && lua_getlocal(L, &ar, 1)) {
if (lua_type(L, -1) == LUA_TTABLE) {
lua_rawgeti(L, -1, 0);
FrameScript_Object* object = static_cast<FrameScript_Object*>(lua_touserdata(L, -1));
lua_settop(L, -2);
if (object) {
const char* objectNameValue = object->GetName();
objectName = objectNameValue ? objectNameValue : "<unnamed>";
}
}
lua_settop(L, -2);
}
record->m_stack.SetCount(level);
memcpy(&record->m_stack.m_data[level - 1].m_debug, &ar, sizeof(ar));
record->m_stack.m_data[level - 1].m_objectName = objectName;
} while (lua_getstack(L, level++, &ar));
}
if (g_taintLogCVar->m_intValue != 1 || (event != 1 && event != 2)) {
PrintTaintEvent(record);
}
}
// VERIFY: 5fea758e manual
// OFFSET: 0x00528F00
void CGGameUI::Shutdown() {
CGGameUI::unk_BD08C4++;
@@ -7321,7 +7544,7 @@ void CGGameUI::Shutdown() {
s_taintLog = nullptr;
}
s_unk_BD0C24 = 0;
s_lastTaintEvent.m_type = 0;
s_taintEvents.InternalClear(0);
}
+10
View File
@@ -8,6 +8,7 @@
#include "Engine/Source/Os/OsFile.h"
#include "Engine/Source/Storm/H/stpl.h"
#include "Engine/Source/Tempest/C3Vector.h"
#include "Engine/Source/lua-5.1/src/lua.h"
#include "WoW/Source/Net/Types.h"
#include "WoW/Source/Object/ObjectClient/Object_C.h"
#include "WoW/Source/Object/WGUID.h"
@@ -502,7 +503,16 @@ bool CVarHandler_useUiScale(CVar* var, const char* oldValue, const char* value,
void LoadAccountVariables();
void LoadPlacedFrames(HOSFILE localFile, HOSFILE cacheFile, void* param);
void LoadSavedVariables(CStatus* status);
struct TaintStackFrame {
/* 0000 */ lua_Debug m_debug;
/* 0064 */ const char* m_objectName;
};
struct TAINTEVENT : public TSHashObject<TAINTEVENT, HASHKEY_STR> {
/* 0018 */ int32_t m_type;
/* 001C */ const char* m_name;
/* 0020 */ const char* m_taint;
/* 0024 */ TSGrowableArray<TaintStackFrame> m_stack;
};
void LoadScriptFunctions();
+36
View File
@@ -20,6 +20,7 @@
#include <ctime>
#include "WoW/Source/DB/DBClient/DBCacheInstances.h"
#include "WoW/Source/Game/GameClient/NameCache.h"
#include "Engine/Source/Os/OsFile.h"
// STATIC: 0x00C211E0
GuildEventLogEntry CGGuildInfo::m_eventLog[100];
@@ -65,6 +66,9 @@ uint8_t CGGuildInfo::unk_C22AD4;
// STATIC: 0x00C22AD8
TSGrowableArray<GuildMemberInfo*> CGGuildInfo::m_roster;
// STATIC: 0x00AD07A4
static const char* s_guildRosterFile = "Logs\\GuildRoster.txt";
// STATIC: 0x00AD07A8
int32_t s_guildControlRank = -1;
@@ -570,6 +574,38 @@ void GuildInfoCacheCallback(int32_t id, const WOWGUID& guid, void* param, bool s
}
}
// VERIFY: c54611bc auto
// OFFSET: 0x005CBAE0
void CGGuildInfo::SaveToFile() {
OsCreateDirectory("Logs", 0);
HOSFILE file = OsCreateFile(s_guildRosterFile, OS_GENERIC_WRITE, 0, OS_CREATE_ALWAYS, OS_FILE_ATTRIBUTE_NORMAL, OS_FILE_TYPE_ANY);
CGPlayer_C* player;
if (file != OS_INVALID_FILE && (player = ClntObjMgrGetActivePlayerObj()) != nullptr) {
WOWGUID guid = player->m_obj->m_guid;
GuildStats_C* stats = g_guildInfoCache.GetRecord(player->m_player->m_playerGuildid, guid, GuildInfoCacheCallback, nullptr, false);
if (!stats) {
return;
}
char line[512];
uint32_t written;
for (uint32_t i = 0; i < CGGuildInfo::m_numMembers; i++) {
GuildMemberInfo* member = CGGuildInfo::m_roster.m_data[i];
ChrClassesRec* chrClass = g_chrClassesDB.GetRecord(member->m_class);
AreaTableRec* area = g_areaTableDB.GetRecord(member->m_zoneID);
SStrPrintf(line, sizeof(line), "%s\t%i\t%s\t%s\t%s\t%s\t%s\t%i\r\n", member->m_name, member->m_level, chrClass ? chrClass->m_name : "", area ? area->m_areaName : "", stats->m_rankNames[member->m_rank], member->m_note, member->m_officerNote, member->m_lastOnline);
OsWriteFile(file, line, SStrLen(line), &written);
}
OsCloseFile(file);
}
CGGuildInfo::unk_C22AD4 = 0;
}
// VERIFY: b420c257 manual
// OFFSET: 0x005CBCA0
bool CGGuildInfo::CanEditGuildEvent() {
-4
View File
@@ -227,10 +227,6 @@ class CGLookingForGroup {
static void ResortLFGLists();
};
namespace DungeonEncounterDB {
void CountMatchingRows(int32_t mapID, int32_t difficulty, uint32_t completedMask, uint32_t* total, uint32_t* completed);
}
LfgDungeonExpansionRec* GetLfgDungeonExpansionRec(int32_t dungeonID, int32_t expansionLevel);
int32_t LFGPacketHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
int32_t Packet_SMSG_LFG_OPEN_FROM_GOSSIP(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
+2 -2
View File
@@ -782,7 +782,7 @@ static int32_t Script_GetLFGRoleUpdateSlot(lua_State* L) {
return CGLookingForGroup::GetLFGRoleUpdateSlot(L);
}
// VERIFY: 1da53d3d manual
// VERIFY: 667e80c2 auto
// OFFSET: 0x00554170
static int32_t PushLFGProposalInfo(lua_State* L) {
if (!CGLookingForGroup::m_proposal.m_id) {
@@ -834,7 +834,7 @@ static int32_t PushLFGProposalInfo(lua_State* L) {
total = 1;
completed = CGLookingForGroup::m_proposal.m_completedMask != 0;
} else {
DungeonEncounterDB::CountMatchingRows(dungeon->m_mapID, dungeon->m_difficulty, CGLookingForGroup::m_proposal.m_completedMask, &total, &completed);
DungeonEncounterCountMatchingRows(dungeon->m_mapID, dungeon->m_difficulty, CGLookingForGroup::m_proposal.m_completedMask, &total, &completed);
}
lua_pushnumber(L, total);
+18
View File
@@ -246,6 +246,24 @@ int32_t CanSendPartyCommand() {
return !CGPartyInfo::m_lastAssignmentTime || static_cast<int32_t>(OsGetAsyncTimeMs() - CGPartyInfo::m_lastAssignmentTime - 750) >= 0;
}
// VERIFY: 8aac24a4 auto
// OFFSET: 0x0052BB10
int32_t Packet_SMSG_INSTANCE_SAVE_CREATED(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
uint32_t debug;
char text[3000];
msg->Get(debug);
if (debug == 0) {
SStrCopy(text, FrameScript_GetText("INSTANCE_SAVED", -1, GENDER_NOT_APPLICABLE), sizeof(text));
CGGameUI::SetInstanceLockTime(0, 0, 0);
} else if (debug == 1) {
SStrPrintf(text, sizeof(text), "(Debug-Only Lock Notice) %s", FrameScript_GetText("INSTANCE_SAVED", -1, GENDER_NOT_APPLICABLE));
}
CGChat::AddChatMessage(text, 0, nullptr, 0, nullptr, nullptr, nullptr, WOWGUID(), 0, WOWGUID(), 0, false, nullptr);
return 1;
}
// VERIFY: daab7afc auto
// OFFSET: 0x0052BBC0
static void LootMasterNameCallback(int32_t id, const WOWGUID& guid, void* param, bool success) {
+177 -2
View File
@@ -31,6 +31,11 @@
#include "WoW/Source/Magic/Spell.h"
#include "WoW/Source/Object/ObjectClient/AuraData.h"
#include "WoW/Source/DB/Rec/SkillRaceClassInfoRec.h"
#include "Engine/Source/BlizzardCore/SFile2-Core.h"
#include "WoW/Source/DB/Rec/SpellVisualEffectNameRec.h"
#include "WoW/Source/DB/Rec/SpellVisualKitRec.h"
#include "WoW/Source/DB/Rec/SpellVisualRec.h"
#include <cstdio>
// STATIC: 0x00BE8E24
TSGrowableArray<SpellUsableInfo> s_shapeshiftSpells;
@@ -267,7 +272,7 @@ void CGSpellBook::ClearSpells() {
}
}
// VERIFY: 3922ffa3 manual
// VERIFY: f6883164 manual
// OFFSET: 0x00542030
void CGSpellBook::AddKnownSpell(int32_t spellId, int32_t notify, int32_t replaceSpell) {
SpellRec spell;
@@ -666,7 +671,7 @@ void CGSpellBook::AddKnownSpell(int32_t spellId, int32_t notify, int32_t replace
}
}
if (player && player->m_unit->m_unitFieldLevel <= 10 && CGSpellBook::GetSpellProgressionRank(&spell) <= 1 && !(spell.m_attributes & 0x40) && !(spell.m_attributesExB & 0x10) && !SpellHasAuraEffect(&spell, 36)) {
if (player && player->m_unit->m_unitFieldLevel <= 10 && CGSpellBook::GetSpellProgressionRank(&spell) <= 1 && !(spell.m_attributes & 0x40) && !(spell.m_attributesExB & 0x10) && !SpellRec::HasAura(&spell, 36)) {
int32_t offset = GetActionBarPageOffset(player, &spell);
for (int32_t slot = offset; slot < offset + 12; slot++) {
@@ -929,6 +934,176 @@ int __cdecl SortCompanions(const void* a, const void* b) {
return static_cast<int>(creatureB - creatureA);
}
// VERIFY: d0921763 manual
// OFFSET: 0x0053C430
static void MakeSpellVisualEffectNameLocal(int32_t id) {
if (!id) {
return;
}
SpellVisualEffectNameRec* effect = g_spellVisualEffectNameDB.GetRecord(id);
if (!effect) {
return;
}
char path[260];
strcpy(path, effect->m_fileName);
SStrLower(path);
char* extension = strrchr(path, '.');
if (!extension) {
return;
}
if (!strcmp(extension, ".mdl") || !strcmp(extension, ".mdx")) {
strcpy(extension, ".m2");
}
SFile::MakeFileLocal(path, 1, false);
for (uint32_t i = 0; i < 4; i++) {
sprintf(extension, "%02d.skin", i);
if (!SFile::MakeFileLocal(path, 1, false)) {
break;
}
}
}
// VERIFY: a19bd6f1 auto
// OFFSET: 0x0053C520
static void MakeSpellVisualKitLocal(int32_t id) {
if (!id) {
return;
}
SpellVisualKitRec* kit = g_spellVisualKitDB.GetRecord(id);
if (!kit) {
return;
}
MakeSpellVisualEffectNameLocal(kit->m_headEffect);
MakeSpellVisualEffectNameLocal(kit->m_chestEffect);
MakeSpellVisualEffectNameLocal(kit->m_baseEffect);
MakeSpellVisualEffectNameLocal(kit->m_leftHandEffect);
MakeSpellVisualEffectNameLocal(kit->m_rightHandEffect);
MakeSpellVisualEffectNameLocal(kit->m_breathEffect);
MakeSpellVisualEffectNameLocal(kit->m_leftWeaponEffect);
MakeSpellVisualEffectNameLocal(kit->m_rightWeaponEffect);
for (uint32_t i = 0; i < 3; i++) {
MakeSpellVisualEffectNameLocal(kit->m_specialEffect[i]);
}
MakeSpellVisualEffectNameLocal(kit->m_worldEffect);
}
// VERIFY: 4e059ff6 auto
// OFFSET: 0x0053E810
static void MakeKnownSpellVisualKitsLocal(int32_t SpellVisualRec::* kit) {
SpellRec spell;
for (uint32_t i = 0; i < s_numSpells; i++) {
if (!g_spellDB.GetRecord(s_spellList[i], &spell)) {
continue;
}
for (uint32_t j = 0; j < 2; j++) {
if (!spell.m_spellVisualID[j]) {
continue;
}
SpellVisualRec* visual = g_spellVisualDB.GetRecord(spell.m_spellVisualID[j]);
if (visual) {
MakeSpellVisualKitLocal(visual->*kit);
}
}
}
}
// VERIFY: 1d27c5ca manual
// OFFSET: 0x0053E930
static void MakeKnownSpellMissilesLocal() {
SpellRec spell;
for (uint32_t i = 0; i < s_numSpells; i++) {
if (!g_spellDB.GetRecord(s_spellList[i], &spell)) {
continue;
}
for (uint32_t j = 0; j < 2; j++) {
if (!spell.m_spellVisualID[j]) {
continue;
}
SpellVisualRec* visual = g_spellVisualDB.GetRecord(spell.m_spellVisualID[j]);
if (visual && visual->m_hasMissile) {
MakeSpellVisualEffectNameLocal(visual->m_missileModel);
}
}
}
}
// OFFSET: 0x0053EA40
void CGSpellBook::MakeKnownSpellModelsLocal() {
MakeKnownSpellMissilesLocal();
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_castKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_stateKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_channelKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_missileTargetingKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_instantAreaKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_persistentAreaKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_impactKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_casterImpactKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_targetImpactKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_impactAreaKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_precastKit);
MakeKnownSpellVisualKitsLocal(&SpellVisualRec::m_stateDoneKit);
}
// VERIFY: 356de315 auto
// OFFSET: 0x0053EAA0
void PrefetchSpellVisuals(int32_t spellId) {
SpellRec spell;
if (!g_spellDB.GetRecord(spellId, &spell)) {
return;
}
for (uint32_t i = 0; i < 2; i++) {
if (!spell.m_spellVisualID[i]) {
continue;
}
SpellVisualRec* visual = g_spellVisualDB.GetRecord(spell.m_spellVisualID[i]);
if (!visual) {
continue;
}
if (visual->m_hasMissile) {
MakeSpellVisualEffectNameLocal(visual->m_missileModel);
}
MakeSpellVisualKitLocal(visual->m_castKit);
MakeSpellVisualKitLocal(visual->m_stateKit);
MakeSpellVisualKitLocal(visual->m_channelKit);
MakeSpellVisualKitLocal(visual->m_missileTargetingKit);
MakeSpellVisualKitLocal(visual->m_instantAreaKit);
MakeSpellVisualKitLocal(visual->m_persistentAreaKit);
MakeSpellVisualKitLocal(visual->m_impactKit);
MakeSpellVisualKitLocal(visual->m_casterImpactKit);
MakeSpellVisualKitLocal(visual->m_targetImpactKit);
MakeSpellVisualKitLocal(visual->m_impactAreaKit);
MakeSpellVisualKitLocal(visual->m_precastKit);
MakeSpellVisualKitLocal(visual->m_stateDoneKit);
}
}
// VERIFY: c8864654 auto
// OFFSET: 0x0053EBC0
void CGSpellBook::CompanionCallback(int32_t id, const WOWGUID& guid, void* param, bool success) {
@@ -35,6 +35,12 @@ void CLCDOutput::Close() {
}
}
// VERIFY: 325fbb1b auto
// OFFSET: 0x00959D20
void CLCDOutput::Shutdown() {
this->Close();
}
// VERIFY: 7579de46 auto
// OFFSET: 0x00959D10
void CLCDOutput::SetGfx(CLCDGfxBase* gfx) {
+1
View File
@@ -82,6 +82,7 @@
#include "WoW/Source/WorldClient/DayNight__DNInfo.h"
#include "WoW/Source/WorldClient/FrameTime.h"
#include "WoW/Source/WorldClient/Map.h"
#include "WoW/Source/WorldClient/MapEntity.h"
#include "WoW/Source/WorldClient/MapWeather.h"
#include "WoW/Source/WorldClient/World.h"
#include <cfloat>
+25
View File
@@ -36,6 +36,31 @@ static int32_t s_wmoGroupID = -1;
// STATIC: 0x00CD85EC
static int32_t s_inMapObj;
// VERIFY: 47f43aed auto
// OFFSET: 0x0078ED80
int32_t AreaListGetName(uint32_t areaId, char* buffer, uint32_t size, int32_t includeParent) {
if (!buffer || !size) {
return 0;
}
*buffer = '\0';
AreaTableRec* area = g_areaTableDB.GetRecord(areaId);
if (!area) {
return 0;
}
AreaTableRec* parent;
if (includeParent && area->m_parentAreaID && (parent = g_areaTableDB.GetRecord(area->m_parentAreaID)) != nullptr) {
SStrPrintf(buffer, size, "%s, %s", area->m_areaName, parent->m_areaName);
return 1;
}
SStrCopy(buffer, area->m_areaName, size);
return 1;
}
// VERIFY: 374cc580 manual
// OFFSET: 0x0078EE30
static void AreaListSendZoneUpdate(int32_t zoneId) {
-5
View File
@@ -366,9 +366,4 @@ inline CImVector InterpColor(const CImVector& a, const CImVector& b, float t) {
}
}
namespace DayNight {
void RemoveLightOverride(uint32_t lightId, uint32_t time);
void AddLightOverride(uint32_t lightId, uint32_t overrideId, uint32_t time);
}
#endif
+26 -26
View File
@@ -21,37 +21,37 @@ void DayNight::DNStars::Initialize() {
this->m_lastTimeMs = OsGetAsyncTimeMs();
}
// VERIFY: 1cf0d118 manual
// VERIFY: e9833dc1 manual
// OFFSET: 0x009ABB60
static void Billboard(C44Matrix* mat, const C3Vector* dir) {
mat->a0 = dir->x;
mat->a1 = dir->y;
mat->a2 = dir->z;
void DayNight::Billboard(C44Matrix& mat, const C3Vector& dir) {
mat.a0 = dir.x;
mat.a1 = dir.y;
mat.a2 = dir.z;
float inv = 1.0f / sqrtf(mat->a2 * mat->a2 + mat->a1 * mat->a1 + mat->a0 * mat->a0);
mat->a0 = mat->a0 * inv;
mat->a1 = mat->a1 * inv;
mat->a2 = inv * mat->a2;
float inv = 1.0f / sqrtf(mat.a2 * mat.a2 + mat.a1 * mat.a1 + mat.a0 * mat.a0);
mat.a0 = mat.a0 * inv;
mat.a1 = mat.a1 * inv;
mat.a2 = inv * mat.a2;
mat->b0 = -mat->a1;
mat->b1 = mat->a0;
mat->b2 = 0.0f;
mat.b0 = -mat.a1;
mat.b1 = mat.a0;
mat.b2 = 0.0f;
if (fabsf(mat->a0 * mat->b0) <= 0.0000099999997f) {
mat->b0 = 0.0f;
mat->b1 = 1.0f;
mat->b2 = 0.0f;
if (fabsf(mat.a0 * mat.b0) <= 0.0000099999997f) {
mat.b0 = 0.0f;
mat.b1 = 1.0f;
mat.b2 = 0.0f;
} else {
float invB = 1.0f / sqrtf(mat->b0 * mat->b0 + mat->b1 * mat->b1);
mat->b0 = mat->b0 * invB;
mat->b1 = invB * mat->b1;
float invB = 1.0f / sqrtf(mat.b0 * mat.b0 + mat.b1 * mat.b1);
mat.b0 = mat.b0 * invB;
mat.b1 = invB * mat.b1;
}
float c0 = mat->b2 * mat->a1 - mat->a2 * mat->b1;
float c1 = mat->a2 * mat->b0 - mat->b2 * mat->a0;
mat->c0 = c0;
mat->c1 = c1;
mat->c2 = mat->a0 * mat->b1 - mat->b0 * mat->a1;
float c0 = mat.b2 * mat.a1 - mat.a2 * mat.b1;
float c1 = mat.a2 * mat.b0 - mat.b2 * mat.a0;
mat.c0 = c0;
mat.c1 = c1;
mat.c2 = mat.a0 * mat.b1 - mat.b0 * mat.a1;
}
// VERIFY: dedd196d manual
@@ -88,7 +88,7 @@ void DayNight::DNStars::Render() {
this->m_scene->Draw(M2PASS_1);
}
// VERIFY: f260b75f manual
// VERIFY: 5fee0e81 manual
// OFFSET: 0x009AC660
void DayNight::DNPlanet::Render() {
C3Vector verts[6];
@@ -121,7 +121,7 @@ void DayNight::DNPlanet::Render() {
C3Vector forward(view.a2, view.b2, view.c2);
C44Matrix billboard;
Billboard(&billboard, &forward);
DayNight::Billboard(billboard, forward);
billboard.d0 = this->m_position.x - info->m_cameraPos.x;
billboard.d1 = this->m_position.y - info->m_cameraPos.y;
billboard.d2 = this->m_position.z - info->m_cameraPos.z;
+344 -2
View File
@@ -989,6 +989,18 @@ static int32_t CompareIntersectCandidates(const void* a, const void* b) {
return 0;
}
// VERIFY: 24e6cf3e auto
// OFFSET: 0x007A20B0
static const char* PathFileName(const char* path) {
const char* name = path;
for (const char* separator = SStrStrI(path, "\\"); separator; separator = SStrStrI(separator + 1, "\\")) {
name = separator + 1;
}
return name;
}
// VERIFY: 85e5829e manual
// OFFSET: 0x007A20E0
void CMap::VectorIntersectSX(CiRect& rect) {
@@ -1137,6 +1149,47 @@ void CMap::VectorIntersectDY(C3Vector& start, C3Vector& end, CiRect& cells) {
World::ObjectCollisionData::ObjectCollisionData() {
}
// VERIFY: 09bec685 manual
// OFFSET: 0x007A25F0
static void AddHitDebugModel(World::HitTestDebug* hitInfo, int32_t depth, CM2Model* model) {
for (; model; model = model->m_attachNext) {
if (hitInfo->m_numModels == 16) {
break;
}
World::HitTestDebug::Model* entry = &hitInfo->m_models[hitInfo->m_numModels++];
entry->m_name = PathFileName(model->m_shared->m_fileName);
entry->m_depth = depth;
entry->m_bbox = model->GetCurrentBoundingBox();
entry->m_sphere = model->GetCurrentBoundingSphere();
entry->m_numGeometryBatches = model->GetNumGeometryBatches();
entry->m_numPrimitives = model->GetNumPrimitives();
entry->m_numOtherBatches = model->GetNumBatches() - entry->m_numGeometryBatches;
entry->m_numBones = (model->m_fFlags & 1) ? model->m_shared->m_data->m_bones.m_count : 0;
if (!(model->m_fFlags & 1)) {
model->WaitForLoad(nullptr);
}
entry->m_numLights = model->m_shared->m_data->m_lights.m_count;
entry->m_numCurrentLights = model->GetCurrentLightCount();
entry->m_attachmentId = model->m_attachmentId;
entry->m_attachmentScale = 1.0f;
if (model->m_attachmentId != 0xFFFFFFFF && model->m_attachParent) {
entry->m_attachmentScale = model->m_attachParent->GetAttachmentWorldScale(model->m_attachmentId);
}
entry->m_model = model;
entry->m_numCombinableBatches = model->GetNumCombinableDoodadBatches();
entry->m_instanceCountMax = model->GetInstanceCountMax();
entry->m_groupName = nullptr;
entry->m_groupNum = 0;
entry->m_groupFlags = 0;
AddHitDebugModel(hitInfo, depth + 1, model->m_attachList);
}
}
// VERIFY: 0869a654 manual
// OFFSET: 0x007A2760
void CMap::VectorIntersectDoodadDefs(TSList<CMapBaseObjLink, TSGetExplicitLink<CMapBaseObjLink> >* list, uint32_t flags) {
@@ -1724,6 +1777,99 @@ void CMap::UpdateArea(int32_t addToScene, CMapArea* area, CiRect* chunkRect, int
}
}
// VERIFY: a9b440d7 manual
// OFFSET: 0x007B50B0
uint32_t CMap::ComputeMapObjLoadProgress(CMapChunk* chunk, float* progress, uint32_t total) {
CAaBox box;
box.b.x = 0.0f;
box.b.y = 0.0f;
box.b.z = 0.0f;
box.t.x = 0.0f;
box.t.y = 0.0f;
box.t.z = 0.0f;
*progress = 0.0f;
float scale = 0.0f;
if (total) {
scale = 1.0f / static_cast<float>(total);
}
TSList<CMapBaseObjLink, TSGetExplicitLink<CMapBaseObjLink> >* list;
if (CMap::bDungeon) {
box.b.x = World::s_currentWorldPos.x - 16.666666f;
box.b.y = World::s_currentWorldPos.y - 16.666666f;
box.b.z = World::s_currentWorldPos.z - 16.666666f;
box.t.x = World::s_currentWorldPos.x + 16.666666f;
box.t.y = World::s_currentWorldPos.y + 16.666666f;
box.t.z = World::s_currentWorldPos.z + 16.666666f;
list = &CMap::mapObjDefLinkList;
} else {
if (!chunk) {
return 0;
}
box = chunk->m_bbox;
box.b.z = World::s_currentWorldPos.z - 16.666666f;
box.t.z = World::s_currentWorldPos.z + 16.666666f;
list = &chunk->m_mapObjDefLinkList;
}
uint32_t remaining = 0;
for (CMapBaseObjLink* link = list->Head(); link; link = list->Next(link)) {
CMapObjDef* mapObjDef = static_cast<CMapObjDef*>(link->m_owner);
if (!(mapObjDef->m_flags & MAPOBJ_FLAG_PREPARED) || !box.Intersects(mapObjDef->m_bbox)) {
continue;
}
for (CMapBaseObjLink* groupLink = mapObjDef->m_mapObjDefGroupLinkList.Head(); groupLink; groupLink = mapObjDef->m_mapObjDefGroupLinkList.Next(groupLink)) {
CMapObjDefGroup* defGroup = static_cast<CMapObjDefGroup*>(groupLink->m_owner);
if (box.t.x < defGroup->m_bbox.b.x || box.t.y < defGroup->m_bbox.b.y || box.t.z < defGroup->m_bbox.b.z || box.b.x > defGroup->m_bbox.t.x || box.b.y > defGroup->m_bbox.t.y || box.b.z > defGroup->m_bbox.t.z) {
continue;
}
if (!(defGroup->m_flags & MAPOBJ_FLAG_PREPARED)) {
if (!mapObjDef->m_owner->IsGroupLoading(defGroup->m_groupNum)) {
continue;
}
CMapObjGroup* group = mapObjDef->m_owner->GetGroup(defGroup->m_groupNum, 0);
if (group && group->m_distToCamera > 0.0f) {
group->m_distToCamera = 0.0f;
}
remaining++;
continue;
}
int32_t pending = 0;
for (CMapBaseObjLink* doodadLink = defGroup->m_doodadDefLinkList.Head(); doodadLink; doodadLink = defGroup->m_doodadDefLinkList.Next(doodadLink)) {
CMapDoodadDef* doodadDef = static_cast<CMapDoodadDef*>(doodadLink->m_owner);
if ((!doodadDef->m_model || !(doodadDef->m_flags & MAPOBJ_FLAG_PREPARED)) && !(doodadDef->unk_007C & 0x10000)) {
doodadDef->unk_007C |= 0x10000;
if (!pending) {
pending = 1;
}
}
}
if (pending) {
remaining++;
}
}
}
*progress += static_cast<float>(total - remaining) * scale;
return remaining;
}
// VERIFY: f7ac6b15 manual
// OFFSET: 0x007B53B0
void CMap::ClearChunkSortList() {
@@ -1970,6 +2116,82 @@ void CMap::PrepareMapObjDef(CMapObjDef* mapObjDef, CMapObj* mapObj) {
CMap::CreateMapObjDefGroups(mapObj, mapObjDef);
}
// VERIFY: 1db2d5f4 manual
// OFFSET: 0x007B5E80
uint32_t CMap::ComputeDoodadLoadProgress(CMapChunk* chunk, float* progress, uint32_t total) {
*progress = 0.0f;
float scale = 0.0f;
if (total) {
scale = 1.0f / static_cast<float>(total);
}
CAaBox box;
TSList<CMapBaseObjLink, TSGetExplicitLink<CMapBaseObjLink> >* list;
if (CMap::bDungeon) {
box.b.x = World::s_currentWorldPos.x - 16.666666f;
box.b.y = World::s_currentWorldPos.y - 16.666666f;
box.b.z = World::s_currentWorldPos.z - 16.666666f;
box.t.x = World::s_currentWorldPos.x + 16.666666f;
box.t.y = World::s_currentWorldPos.y + 16.666666f;
box.t.z = World::s_currentWorldPos.z + 16.666666f;
list = &CMap::s_unk_ADFBF8;
} else {
if (!chunk) {
return 0;
}
box = chunk->m_bbox;
box.b.z = World::s_currentWorldPos.z - 16.666666f;
box.t.z = World::s_currentWorldPos.z + 16.666666f;
list = &chunk->m_doodadDefLinkList;
}
uint32_t remaining = 0;
for (CMapBaseObjLink* link = list->Head(); link; link = list->Next(link)) {
CMapDoodadDef* doodadDef = static_cast<CMapDoodadDef*>(link->m_owner);
if ((doodadDef->m_model && (doodadDef->m_flags & MAPOBJ_FLAG_PREPARED)) || (doodadDef->unk_007C & 0x10000)) {
continue;
}
if (total) {
int64_t loaded = 0;
int64_t size = 0;
doodadDef->m_model->ComputeLoadProgress(loaded, size);
*progress += static_cast<float>(loaded) / static_cast<float>(size) * scale;
}
doodadDef->unk_007C |= 0x10000;
remaining++;
}
for (CMapObjDef* mapObjDef = CMap::mapObjDefHash.m_fulllist.Head(); mapObjDef; mapObjDef = CMap::mapObjDefHash.m_fulllist.Next(mapObjDef)) {
if (mapObjDef->m_flags & MAPOBJ_FLAG_PREPARED) {
continue;
}
CMapObj* mapObj = mapObjDef->m_owner;
if (!mapObj->m_asyncObject) {
continue;
}
if (box.t.x >= mapObjDef->m_bbox.b.x && box.t.y >= mapObjDef->m_bbox.b.y && box.t.z >= mapObjDef->m_bbox.b.z && box.b.x <= mapObjDef->m_bbox.t.x && box.b.y <= mapObjDef->m_bbox.t.y && box.b.z <= mapObjDef->m_bbox.t.z) {
remaining++;
if (mapObj->m_distToCamera > 0.0f) {
mapObj->m_distToCamera = 0.0f;
}
}
}
*progress += static_cast<float>(total - remaining) * scale;
return remaining;
}
// VERIFY: 61aca6d6 manual
// OFFSET: 0x007B6110
void CMap::PrepareMapObjDefs(bool a1) {
@@ -4563,6 +4785,126 @@ bool CMap::GetFacets(CAaBox* a1, CAaBox* a2, World::FacetData* a3, uint32_t a4,
return result;
}
// VERIFY: 4b94dd93 manual
// OFFSET: 0x007A2C60
void CMap::SetHitTestDebug(World::HitTestDebug* hitInfo, CMapBaseObj* hitObject) {
hitInfo->m_bbox.b.x = 0.0f;
hitInfo->m_bbox.b.y = 0.0f;
hitInfo->m_bbox.b.z = 0.0f;
hitInfo->m_bbox.t.x = 0.0f;
hitInfo->m_bbox.t.y = 0.0f;
hitInfo->m_bbox.t.z = 0.0f;
hitInfo->m_sphere.c.x = 0.0f;
hitInfo->m_sphere.c.y = 0.0f;
hitInfo->m_sphere.c.z = 0.0f;
hitInfo->m_sphere.r = 0.0f;
hitInfo->m_labelPos.x = 0.0f;
hitInfo->m_labelPos.y = 0.0f;
hitInfo->m_type = 0;
hitInfo->m_numModels = 0;
hitInfo->m_numParents = 0;
hitInfo->m_labelPos.z = 0.0f;
if (!hitObject) {
return;
}
CM2Model* model = nullptr;
if (hitObject->m_type & 0x40) {
CMapStaticEntity* entity = static_cast<CMapStaticEntity*>(hitObject);
hitInfo->m_type = 1;
hitInfo->m_bbox = entity->m_bbox;
hitInfo->m_sphere = entity->m_sphere;
hitInfo->m_labelPos = entity->m_vec2;
hitInfo->m_labelPos.z += 0.1f;
model = entity->m_model;
} else if (hitObject->m_type & 0x20) {
CMapStaticEntity* entity = static_cast<CMapStaticEntity*>(hitObject);
hitInfo->m_type = 2;
hitInfo->m_bbox = entity->m_bbox;
hitInfo->m_sphere = entity->m_sphere;
hitInfo->m_labelPos = entity->m_vec2;
if (entity->unk_007C & 0x2000) {
float raised = hitInfo->m_labelPos.z + 4.0f;
float top = entity->m_bbox.t.z + 0.1f;
hitInfo->m_labelPos.z = top > raised ? raised : top;
}
model = entity->m_model;
} else if (hitObject->m_type & 0x10) {
CMapObjDefGroup* defGroup = static_cast<CMapObjDefGroup*>(hitObject);
CMapObjDef* mapObjDef = static_cast<CMapObjDef*>(defGroup->m_parentLinkList.Head()->m_ref);
CMapObj* mapObj = mapObjDef->m_owner;
CMapObjGroup* group = mapObj->GetGroup(defGroup->m_groupNum, 0);
World::HitTestDebug::Model* entry = &hitInfo->m_models[hitInfo->m_numModels++];
hitInfo->m_type = 4;
entry->m_name = PathFileName(mapObj->m_wmoName);
entry->m_depth = 0;
entry->m_bbox = defGroup->m_bbox;
entry->m_sphere = defGroup->m_sphere;
entry->m_numGeometryBatches = group->m_batchListCount;
entry->m_numPrimitives = group->m_polyListSize;
entry->m_model = nullptr;
entry->m_attachmentScale = 1.0f;
entry->m_numOtherBatches = 0;
entry->m_numBones = 0;
entry->m_numLights = 0;
entry->m_numCurrentLights = 0;
entry->m_attachmentId = 0;
entry->m_numCombinableBatches = 0;
entry->m_instanceCountMax = 0;
entry->m_groupName = group->m_groupName;
entry->m_groupNum = defGroup->m_groupNum;
entry->m_groupFlags = group->m_flags & 8;
entry->m_doodadSet = mapObjDef->m_doodadSet;
}
CMapBaseObj* object = hitObject;
if (object->m_type & 0x10) {
object = object->m_parentLinkList.Head()->m_ref;
}
for (CMapBaseObjLink* link = object->m_parentLinkList.Head(); link; link = object->m_parentLinkList.Next(link)) {
CMapBaseObj* parent = link->m_ref;
if (!parent) {
continue;
}
if (parent->m_type & 0x4) {
if (hitInfo->m_numParents < 8) {
World::HitTestDebug::Parent* entry = &hitInfo->m_parents[hitInfo->m_numParents++];
entry->m_name = "Terrain";
entry->m_groupName = nullptr;
entry->m_chunkOffset = static_cast<CMapChunk*>(parent)->m_cOffset;
}
} else if (parent->m_type & 0x10) {
CMapObjDefGroup* defGroup = static_cast<CMapObjDefGroup*>(parent);
CMapObj* mapObj = static_cast<CMapObjDef*>(defGroup->m_parentLinkList.Head()->m_ref)->m_owner;
CMapObjGroup* group = mapObj->GetGroup(defGroup->m_groupNum, 0);
if (hitInfo->m_numParents < 8) {
World::HitTestDebug::Parent* entry = &hitInfo->m_parents[hitInfo->m_numParents++];
entry->m_name = PathFileName(mapObj->m_wmoName);
entry->m_groupName = group->m_groupName;
entry->m_chunkOffset.x = 0;
entry->m_chunkOffset.y = 0;
}
}
}
if (model) {
while (model->m_attachParent) {
model = model->m_attachParent;
}
AddHitDebugModel(hitInfo, 0, model);
}
}
// VERIFY: a85f0fdc manual
// OFFSET: 0x007A30D0
bool CMap::VectorIntersect(C3Vector* start, C3Vector* end, uint32_t flags, uint32_t defIgnoreFlags, float* distance, uint16_t* hitIndex, CMapObj** outMapObj, CMapObjDef** outMapObjDef, CMapObjDefGroup** outMapObjDefGroup) {
@@ -4692,9 +5034,9 @@ bool CMap::VectorIntersect(C3Vector* start, C3Vector* end, uint32_t flags, uint3
return hit;
}
// VERIFY: 25b6241c manual
// VERIFY: b625f45f manual
// OFFSET: 0x007A3B70
bool CMap::Intersect(C3Vector* start, C3Vector* end, C3Vector* hitPoint, float* distance, uint32_t flags, void* hitInfo) {
bool CMap::Intersect(C3Vector* start, C3Vector* end, C3Vector* hitPoint, float* distance, uint32_t flags, World::HitTestDebug* hitInfo) {
CMap::s_queryTag++;
bool hit = false;
CMapObjDef* mapObjDef = nullptr;
+3 -3
View File
@@ -38,7 +38,7 @@ class CMapStaticEntity;
class CiRect;
class SFileImpl;
class SFile;
namespace World { class FacetData; class TriData; struct LiquidQueryResult; class ObjectCollisionData; }
namespace World { class FacetData; class TriData; struct LiquidQueryResult; class ObjectCollisionData; class HitTestDebug; }
struct CGxBuf;
struct CGxPool;
@@ -373,7 +373,7 @@ class CMap {
static void UpdateLightBounds(CMapLight* light);
static void LinkLightToMapObjDefs(CMapLight* light);
static void LinkLightToChunks(CMapLight* light);
static bool Intersect(C3Vector* start, C3Vector* end, C3Vector* hitPoint, float* distance, uint32_t flags, void* hitInfo);
static bool Intersect(C3Vector* start, C3Vector* end, C3Vector* hitPoint, float* distance, uint32_t flags, World::HitTestDebug* hitInfo);
static bool VectorIntersect(C3Vector* start, C3Vector* end, uint32_t flags, uint32_t defIgnoreFlags, float* distance, uint16_t* hitIndex, CMapObj** outMapObj, CMapObjDef** outMapObjDef, CMapObjDefGroup** outMapObjDefGroup);
static bool VectorIntersectTerrain(C3Vector* start, C3Vector* end, float* distance, uint32_t flags, CMapChunk** hitChunk);
static bool VectorIntersectSubChunkList(C3Vector* start, C3Vector* end, float* distance, uint32_t flags, CMapChunk** hitChunk);
@@ -384,7 +384,7 @@ class CMap {
static void VectorIntersectSX(CiRect& rect);
static void VectorIntersectDY(C3Vector& a1, C3Vector& a2, CiRect& rect);
static void VectorIntersectDX(C3Vector& a1, C3Vector& a2, CiRect& rect);
static void SetHitTestDebug(void* hitInfo, CMapBaseObj* hitObject);
static void SetHitTestDebug(World::HitTestDebug* hitInfo, CMapBaseObj* hitObject);
static bool LocateViewerMapObjs(C3Vector& start, C3Vector& end, float dist, CMapObjDef** outDefs, uint32_t* outGroups);
static void TestQueryAdd(const CFacet& facet, CImVector color, const C44Matrix* mat);
static bool QueryLiquidStatusMapObjsExt(C3Vector* pos, int32_t* liquidType, float* height);
+10
View File
@@ -12,3 +12,13 @@ CMapBaseObj::CMapBaseObj() {
this->m_refCount = 0;
this->m_flags = static_cast<MapObjFlag>(0);
}
// VERIFY: a8266a2d auto
// OFFSET: 0x00632050
void CMapBaseObj::SelectLights(CM2Lighting* lighting) {
}
// VERIFY: e2a6c90a auto
// OFFSET: 0x00632050
void CMapBaseObj::SelectUnderwater(CM2Lighting* lighting) {
}
+63
View File
@@ -23,6 +23,11 @@
#include "WoW/Source/WorldClient/MapLight.h"
#include "WoW/Source/WorldClient/Types.h"
#include "WoW/Source/WorldClient/World.h"
#if defined(_MSC_VER)
#include <malloc.h>
#else
#include <alloca.h>
#endif
// STATIC: 0x00AEEBF8
static uint32_t s_maxVertexCount = 145;
@@ -783,6 +788,64 @@ void CMapRenderChunk::RenderPrep() {
}
}
// VERIFY: 5ffc93a3 manual
// OFFSET: 0x007D40A0
void CMapRenderChunk::RenderSinglePass() {
g_theGxDevicePtr->RsPush();
GxRsSet(GxRs_Fog, 0);
GxRsSet(GxRs_Lighting, 0);
GxRsSet(GxRs_VertexShader, 0);
GxRsSet(GxRs_PixelShader, 0);
uint32_t vertexCount = this->m_mapChunks[1] ? 290 : 145;
CGxBuf* vertexBuf = g_theGxDevicePtr->BufStream(GxPoolTarget_Vertex, sizeof(CGxVertexPC), 2 * vertexCount);
CGxVertexPC* vertices = reinterpret_cast<CGxVertexPC*>(g_theGxDevicePtr->BufLock(vertexBuf));
CGxBuf* indexBuf = g_theGxDevicePtr->BufStream(GxPoolTarget_Index, sizeof(uint16_t), 2 * vertexCount);
uint16_t* indices = reinterpret_cast<uint16_t*>(g_theGxDevicePtr->BufLock(indexBuf));
CGxVertexPN* source = static_cast<CGxVertexPN*>(alloca(sizeof(CGxVertexPN) * 145));
uint16_t index = 0;
for (uint32_t i = 0; i < 2; i++) {
CMapChunk* chunk = this->m_mapChunks[i];
if (!chunk) {
continue;
}
chunk->CreateVerticesWorld(source, C3Vector(0.0f, 0.0f, 0.0f));
for (uint32_t j = 0; j < 145; j++) {
vertices[0].p = source[j].m_position;
vertices[0].c = CImVector(0x00, 0xFF, 0xFF, 0xFF);
vertices[1].p.x = source[j].m_normal.x * 0.75f + source[j].m_position.x;
vertices[1].p.y = source[j].m_normal.y * 0.75f + source[j].m_position.y;
vertices[1].p.z = source[j].m_normal.z * 0.75f + source[j].m_position.z;
vertices[1].c = CImVector(0x00, 0xFF, 0xFF, 0xFF);
vertices += 2;
indices[0] = index;
indices[1] = index + 1;
indices += 2;
index += 2;
}
}
g_theGxDevicePtr->BufUnlock(vertexBuf, 0);
vertexBuf->unk_001C = 1;
GxPrimVertexPtr(vertexBuf, GxVBF_PC);
g_theGxDevicePtr->BufUnlock(indexBuf, 0);
indexBuf->unk_001C = 1;
g_theGxDevicePtr->PrimIndexPtr(indexBuf);
CGxBatch batch;
batch.m_primType = GxPrim_Lines;
batch.m_start = 0;
batch.m_count = 2 * vertexCount;
batch.m_minIndex = 0;
batch.m_maxIndex = static_cast<uint16_t>(2 * vertexCount);
g_theGxDevicePtr->Draw(&batch, 1);
g_theGxDevicePtr->RsPop();
}
// INLINED
CMapRenderChunkLayer::CMapRenderChunkLayer() {
this->m_flags = 0;
+203
View File
@@ -18,6 +18,7 @@
#include "WoW/Source/WorldClient/FrameTime.h"
#include "WoW/Source/WorldClient/MapWeather.h"
#include "WoW/Source/WorldClient/World.h"
#include "Engine/Source/Gx/CGxVertexPT.h"
// STATIC: 0x00ADF220
static float s_maxWindTilt = 45.0f;
@@ -402,6 +403,208 @@ void Rain::UpdatePackets() {
}
}
// VERIFY: e7a71254 manual
// OFFSET: 0x007891B0
void Rain::RenderPatterPacketsSW() {
if (!this->m_rainPatterPacketList.m_activePackets.Head()) {
return;
}
CGxTex* texture = TextureGetGxTex(this->m_rainDropSplashTex, 0, nullptr);
if (!texture) {
return;
}
g_theGxDevicePtr->RsPush();
GxRsSet(GxRs_BlendingMode, 5);
GxRsSet(GxRs_AlphaRef, static_cast<int32_t>(CGxDevice::s_alphaRef[g_theGxDevicePtr->m_appRenderStates.m_data[GxRs_BlendingMode].m_value.m_data.i[0]]));
GxRsSet(GxRs_ColorOp0, 0);
GxRsSet(GxRs_AlphaOp0, 0);
GxRsSet(GxRs_MatDiffuse, *reinterpret_cast<int32_t*>(&World::s_weather->m_color));
GxRsSet(GxRs_DepthWrite, 0);
GxRsSet(GxRs_Lighting, 0);
GxRsSet(GxRs_Fog, 1);
GxRsSet(GxRs_Culling, 0);
GxRsSet(GxRs_FogStart, 70.0f);
GxRsSet(GxRs_FogEnd, 75.0f);
GxRsSet(GxRs_FogColor, static_cast<int32_t>(0x80808080));
GxRsSet(GxRs_Texture0, texture);
C44Matrix view;
GxXformView(view);
C3Vector right(view.a0 * 0.083333336f, view.b0 * 0.083333336f, view.c0 * 0.083333336f);
C3Vector up(view.a1 * 0.16666667f, view.b1 * 0.16666667f, view.c1 * 0.16666667f);
C3Vector left(-right.x, -right.y, -right.z);
C3Vector camera = *World::GetCamPos();
uint32_t now = CWorld::s_elapsedTicks;
for (Packet<RainPatterParticleBuffer>* packet = this->m_rainPatterPacketList.m_activePackets.Head(); packet; packet = this->m_rainPatterPacketList.m_activePackets.Next(packet)) {
if (packet->m_packetStartTick >= now) {
continue;
}
float age = (now - packet->m_packetStartTick) * 0.0009765625f;
CGxBuf* vertexBuf = g_theGxDevicePtr->BufStream(GxPoolTarget_Vertex, sizeof(CGxVertexPT), 3 * packet->m_currParticle);
CGxVertexPT* vertices = reinterpret_cast<CGxVertexPT*>(g_theGxDevicePtr->BufLock(vertexBuf));
uint32_t vertexCount = 0;
for (uint32_t i = 0; i < packet->m_currParticle; i++) {
const RainPatterParticle& particle = packet->m_particlesBuffer.m_particles[i];
if (particle.m_startTime > age || particle.m_endTime < age) {
continue;
}
C3Vector center = particle.m_position - camera;
float scale = 1.0f / sqrt(center.x * center.x + center.z * center.z + center.y * center.y);
C3Vector toCamera(-(center.x * scale), -(center.y * scale), -(center.z * scale));
float facing = toCamera.x * 0.0f + toCamera.y * 0.0f + toCamera.z;
if (facing <= 0.0f) {
facing = 0.0f;
}
center.x = center.x - up.x * (0.5f * facing);
center.y = center.y - up.y * (0.5f * facing);
center.z = center.z - up.z * (0.5f * facing) + facing * 0.083333336f;
float u = static_cast<float>(floor((age - particle.m_startTime) * 4.0f * 3.99f)) * 0.25f;
float v = static_cast<float>(floor((1.0f - facing) * 3.99f)) * 0.25f;
vertices[0].p = left + center;
vertices[0].tc.x = u;
vertices[0].tc.y = v + 0.25f;
vertices[1].p = center + up;
vertices[1].tc.x = u + 0.125f;
vertices[1].tc.y = v + 0.04296875f;
vertices[2].p = center + right;
vertices[2].tc.x = u + 0.25f;
vertices[2].tc.y = v + 0.25f;
vertices += 3;
vertexCount += 3;
}
g_theGxDevicePtr->BufUnlock(vertexBuf, 0);
vertexBuf->unk_001C = 1;
if (vertexCount) {
GxPrimVertexPtr(vertexBuf, GxVBF_PT);
CGxBatch batch;
batch.m_primType = GxPrim_Triangles;
batch.m_start = 0;
batch.m_count = vertexCount;
batch.m_minIndex = 0;
batch.m_maxIndex = 0;
g_theGxDevicePtr->Draw(&batch, 0);
}
}
g_theGxDevicePtr->RsPop();
}
// VERIFY: fc199a69 manual
// OFFSET: 0x007898A0
void Rain::RenderDropPacketsSW() {
if (!this->m_rainDropPacketList.m_activePackets.Head()) {
return;
}
CGxTex* texture = TextureGetGxTex(this->m_rainDropTex, 0, nullptr);
if (!texture) {
return;
}
g_theGxDevicePtr->RsPush();
GxRsSet(GxRs_BlendingMode, 5);
GxRsSet(GxRs_AlphaRef, static_cast<int32_t>(CGxDevice::s_alphaRef[g_theGxDevicePtr->m_appRenderStates.m_data[GxRs_BlendingMode].m_value.m_data.i[0]]));
GxRsSet(GxRs_ColorOp0, 0);
GxRsSet(GxRs_AlphaOp0, 0);
GxRsSet(GxRs_MatDiffuse, *reinterpret_cast<int32_t*>(&World::s_weather->m_color));
GxRsSet(GxRs_DepthWrite, 0);
GxRsSet(GxRs_Lighting, 0);
GxRsSet(GxRs_Fog, 1);
GxRsSet(GxRs_Culling, 0);
GxRsSet(GxRs_FogStart, 70.0f);
GxRsSet(GxRs_FogEnd, 75.0f);
GxRsSet(GxRs_FogColor, static_cast<int32_t>(0x80808080));
GxRsSet(GxRs_Texture0, texture);
C3Vector camera = *World::GetCamPos();
uint32_t now = CWorld::s_elapsedTicks;
C33Matrix blur(1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f);
Rain::GetMotionBlurMatrix(&blur);
float tilt = Rain::GetWindTiltFactor();
for (Packet<RainParticleBuffer>* packet = this->m_rainDropPacketList.m_activePackets.Head(); packet; packet = this->m_rainDropPacketList.m_activePackets.Next(packet)) {
if (packet->m_packetStartTick >= now) {
continue;
}
float age = (now - packet->m_packetStartTick) * 0.0009765625f;
CGxBuf* vertexBuf = g_theGxDevicePtr->BufStream(GxPoolTarget_Vertex, sizeof(CGxVertexPT), 3 * packet->m_currParticle);
CGxVertexPT* vertices = reinterpret_cast<CGxVertexPT*>(g_theGxDevicePtr->BufLock(vertexBuf));
uint32_t vertexCount = 0;
for (uint32_t i = 0; i < packet->m_currParticle; i++) {
const RainDropParticle& particle = packet->m_particlesBuffer.m_particles[i];
C2Vector tex0(0.0f, 1.0f);
C2Vector tex1(1.0f, 1.0f);
C2Vector tex2(0.5f, 0.0f);
C3Vector offset = particle.m_position - camera;
float tailTime = particle.m_impactTime - tilt / particle.m_velocity.z;
if (age < particle.m_startTime || tailTime < age) {
continue;
}
float headTime = (age >= particle.m_impactTime ? particle.m_impactTime : age) - particle.m_startTime;
float trailTime = (tailTime <= age ? tailTime : age) - particle.m_startTime;
C3Vector head = offset + particle.m_velocity * headTime;
C3Vector tail = offset + particle.m_velocity * trailTime;
C3Vector toCamera(-head.x, -head.y, -head.z);
float scale = 1.0f / sqrt(toCamera.z * toCamera.z + toCamera.y * toCamera.y + toCamera.x * toCamera.x);
toCamera.x *= scale;
toCamera.y *= scale;
toCamera.z *= scale;
C3Vector direction(-particle.m_velocity.x, -particle.m_velocity.y, -particle.m_velocity.z);
scale = 1.0f / sqrt(direction.z * direction.z + direction.y * direction.y + direction.x * direction.x);
direction.x *= scale;
direction.y *= scale;
direction.z *= scale;
C3Vector side(direction.z * toCamera.y - direction.y * toCamera.z, toCamera.z * direction.x - direction.z * toCamera.x, toCamera.x * direction.y - toCamera.y * direction.x);
scale = 1.0f / sqrt(side.z * side.z + side.y * side.y + side.x * side.x);
side.x *= scale;
side.y *= scale;
side.z *= scale;
vertices[0].p = side * -0.050000001f + head;
vertices[0].tc = tex0;
vertices[1].p = head + side * 0.050000001f;
vertices[1].tc = tex1;
C3Vector streak = direction * 2.0f;
vertices[2].p.x = blur.a0 * streak.x + blur.a1 * streak.y + blur.a2 * streak.z + tail.x;
vertices[2].p.y = blur.b0 * streak.x + blur.b1 * streak.y + blur.b2 * streak.z + tail.y;
vertices[2].p.z = blur.c0 * streak.x + blur.c1 * streak.y + blur.c2 * streak.z + tail.z;
vertices[2].tc = tex2;
vertices += 3;
vertexCount += 3;
}
g_theGxDevicePtr->BufUnlock(vertexBuf, 0);
vertexBuf->unk_001C = 1;
if (vertexCount) {
GxPrimVertexPtr(vertexBuf, GxVBF_PT);
CGxBatch batch;
batch.m_primType = GxPrim_Triangles;
batch.m_start = 0;
batch.m_count = vertexCount;
batch.m_minIndex = 0;
batch.m_maxIndex = 0;
g_theGxDevicePtr->Draw(&batch, 0);
}
}
g_theGxDevicePtr->RsPop();
}
// VERIFY: b4ae734d manual
// OFFSET: 0x0078A030
void Rain::RenderPatterPackets() {
+41 -2
View File
@@ -6,6 +6,8 @@
#include "Engine/Source/Tempest/CBoundingBox.h"
#include "Engine/Source/Tempest/C3Vector.h"
#include "Engine/Source/Tempest/CAaBox.h"
#include "Engine/Source/Tempest/CAaSphere.h"
#include "Engine/Source/Tempest/C2iVector.h"
#include "Engine/Source/Event/Types.h"
#include "Engine/Source/Storm/H/stpl.h"
#include "WoW/Source/WorldClient/CMapBaseObjLink.h"
@@ -335,7 +337,45 @@ class WMOAreaTableRec;
namespace World {
class TriData;
class HitTestDebug;
class HitTestDebug {
public:
struct Model {
/* 0000 */ const char* m_name;
/* 0004 */ int32_t m_depth;
/* 0008 */ CAaBox m_bbox;
/* 0020 */ CAaSphere m_sphere;
/* 0030 */ uint32_t m_numGeometryBatches;
/* 0034 */ uint32_t m_numPrimitives;
/* 0038 */ uint32_t m_numOtherBatches;
/* 003C */ uint32_t m_numBones;
/* 0040 */ uint32_t m_numLights;
/* 0044 */ uint32_t m_numCurrentLights;
/* 0048 */ uint32_t m_attachmentId;
/* 004C */ float m_attachmentScale;
/* 0050 */ CM2Model* m_model;
/* 0054 */ uint32_t m_numCombinableBatches;
/* 0058 */ uint32_t m_instanceCountMax;
/* 005C */ const char* m_groupName;
/* 0060 */ uint32_t m_groupNum;
/* 0064 */ uint32_t m_groupFlags;
/* 0068 */ int32_t m_doodadSet;
};
struct Parent {
/* 0000 */ const char* m_name;
/* 0004 */ const char* m_groupName;
/* 0008 */ C2iVector m_chunkOffset;
};
/* 0000 */ int32_t m_type;
/* 0004 */ uint32_t m_numModels;
/* 0008 */ uint32_t m_numParents;
/* 000C */ Model m_models[16];
/* 06CC */ Parent m_parents[8];
/* 074C */ CAaBox m_bbox;
/* 0764 */ CAaSphere m_sphere;
/* 0774 */ C3Vector m_labelPos;
};
struct LiquidQueryResult {
/* 0000 */ int32_t m_liquidType;
@@ -383,7 +423,6 @@ namespace World {
void Preload(const C3Vector& position, int32_t a2);
int32_t QueryMapId();
void UpdateObjectFadeouts();
uint64_t QueryObjectParentParam64(CMapEntity* entity);
void Update(const C3Vector& position);
int32_t QueryOutdoors(CMapEntity* entity);
int32_t QueryObjectLiquid(CMapEntity* entity, int32_t* liquidType, float* height, int32_t* a4);
+25
View File
@@ -224,6 +224,31 @@ void Grunt::ClientLink::LogonStoredSession(const Grunt::ClientLink::Logon& logon
this->Send(msg);
}
// VERIFY: 09a17985 manual
// OFFSET: 0x008CDB90
void Grunt::ClientLink::SendSurveyData(uint16_t size, uint8_t* data) {
CDataStoreCache<1024> msg;
msg.Put(static_cast<uint8_t>(4));
msg.Put(this->m_surveyId);
msg.Put(static_cast<uint8_t>(0));
msg.Put(size);
msg.PutData(data, size);
msg.Finalize();
this->Send(msg);
}
// VERIFY: d759d347 manual
// OFFSET: 0x008CDD00
void Grunt::ClientLink::SendSurveyFailed() {
CDataStoreCache<1024> msg;
msg.Put(static_cast<uint8_t>(4));
msg.Put(this->m_surveyId);
msg.Put(static_cast<uint8_t>(1));
msg.Put(static_cast<uint16_t>(0));
msg.Finalize();
this->Send(msg);
}
// VERIFY: 01aad7f9 auto
// OFFSET: 0x008CE5C0
void Grunt::Timer::Insert(Grunt::Timer::Event& event) {
+2
View File
@@ -167,6 +167,8 @@ class ClientLink : public WowConnectionResponse, public Grunt::Pending, public G
void GetRealmList();
void LogonNewSession(const Grunt::ClientLink::Logon& logon);
void LogonStoredSession(const Grunt::ClientLink::Logon& logon);
void SendSurveyData(uint16_t size, uint8_t* data);
void SendSurveyFailed();
void PackLogon(CDataStore& msg, const Grunt::ClientLink::Logon& logon);
void ProveVersion(const uint8_t* versionChecksum);
void Send(CDataStore& msg);
+12
View File
@@ -592,6 +592,18 @@ void GruntLogin::FileAccept(bool accept, uint64_t offset) {
this->m_clientLink->FileStatus(accept, offset);
}
// VERIFY: 50215692 auto
// OFFSET: 0x008CA550
void GruntLogin::SendSurveyData(uint16_t size, uint8_t* data) {
this->m_clientLink->SendSurveyData(size, data);
}
// VERIFY: d5f0969d auto
// OFFSET: 0x008CA560
void GruntLogin::SendSurveyFailed() {
this->m_clientLink->SendSurveyFailed();
}
// VERIFY: e0ac23d3 auto
// OFFSET: 0x008CA570
void GruntLogin::FileComplete(bool success) {
@@ -464,3 +464,38 @@ RealmConnection::~RealmConnection() {
this->m_realmResponse = nullptr;
RealmConnection::s_allRealmConnectionsCrit.Leave();
}
// VERIFY: a9aa9a7d auto
// OFFSET: 0x006B1B90
void RealmResponse::JoinRealmResult(uint32_t realmID, int32_t result, int32_t a3, int32_t a4, int32_t a5) {
}
// VERIFY: 01c03df0 auto
// OFFSET: 0x00653A10
void RealmResponse::OnChatPlayerNotFound(RealmConnection* connection, const char* name) {
}
// VERIFY: 0ef00e5d auto
// OFFSET: 0x006B0960
void RealmResponse::OnCharacterRestored(RealmConnection* connection, bool success, uint32_t a3, uint32_t a4, uint32_t a5, uint64_t a6, uint64_t a7, uint32_t a8, const char* a9, uint32_t a10, CDataStore* msg, uint64_t a12, uint64_t a13) {
}
// VERIFY: 4201e0ab auto
// OFFSET: 0x006B1B80
void RealmResponse::OnChangeArenaTeamRating(RealmConnection* connection, bool success, int32_t a3, int32_t a4) {
}
// VERIFY: ceede6fc auto
// OFFSET: 0x006B1B80
void RealmResponse::OnServerInfo(RealmConnection* connection, int32_t a2, int32_t a3, char* a4) {
}
// VERIFY: d7d1893d auto
// OFFSET: 0x00653A10
void RealmResponse::HandleCharacterLoginFailed(RealmConnection* connection, uint8_t result) {
}
// VERIFY: 44e6f046 auto
// OFFSET: 0x00632050
void RealmResponse::HandleReceivingObjects(RealmConnection* connection) {
}
@@ -89,6 +89,18 @@ void WowConnection::DoStreamReads() {
this->ReleaseResponseRef();
}
// VERIFY: 7e1ee1a4 auto
// OFFSET: 0x00467270
WowConnection::WowConnection(int32_t sock, const NETADDR* addr, WowConnectionResponse* response) {
this->Init(response, nullptr);
int32_t nameLength = sizeof(this->m_peer.peerAddr);
getpeername(sock, reinterpret_cast<sockaddr*>(&this->m_peer.peerAddr), &nameLength);
nameLength = sizeof(this->m_peer.selfAddr);
getsockname(sock, reinterpret_cast<sockaddr*>(&this->m_peer.selfAddr), &nameLength);
this->m_sock = sock;
this->m_connState = WOWC_CONNECTED;
}
// VERIFY: 46d88949 manual
// OFFSET: 0x004675F0
int32_t WowConnection::SendPacket(CDataStore* msg, int32_t headroom) {
@@ -497,6 +509,55 @@ void WowConnection::CheckConnect() {
this->Release();
}
// VERIFY: 7917c15e manual
// OFFSET: 0x00468580
void WowConnection::CheckAccept() {
for (int32_t i = 0; i < 1000; i++) {
NETADDR addr;
int32_t addrLength = sizeof(addr);
int32_t sock = static_cast<int32_t>(accept(this->m_sock, reinterpret_cast<sockaddr*>(&addr), &addrLength));
if (sock < 0) {
break;
}
if (WowConnection::s_verifyAddr) {
NETADDR peer;
int32_t peerLength = sizeof(peer);
getpeername(sock, reinterpret_cast<sockaddr*>(&peer), &peerLength);
if (!WowConnection::s_verifyAddr(&peer)) {
closesocket(sock);
continue;
}
}
WowConnection::MarkSocketId(sock);
u_long nonBlocking = 1;
ioctlsocket(sock, FIONBIO, &nonBlocking);
WowConnection* inbound = new (__FILE__, __LINE__) WowConnection(sock, &addr, this->m_response);
inbound->AddRef();
this->AddRef();
this->AcquireResponseRef();
WowConnectionResponse* response = this->m_response;
this->m_lock.Leave();
if (response) {
response->WCConnected(this, inbound, OsGetAsyncTimeMs(), &inbound->m_peer);
}
WowConnection::s_network->Add(inbound);
WowConnection::s_network->PlatformChangeState(inbound, inbound->m_connState);
inbound->Release();
this->m_lock.Enter();
this->ReleaseResponseRef();
this->Release();
}
}
// VERIFY: 37ac6829 manual
// OFFSET: 0x00468790
void WowConnection::DoWrites() {
@@ -86,6 +86,17 @@ void WowConnection::DoStreamReads() {
this->ReleaseResponseRef();
}
// OFFSET: 0x00467270
WowConnection::WowConnection(int32_t sock, const NETADDR* addr, WowConnectionResponse* response) {
this->Init(response, nullptr);
int32_t nameLength = sizeof(this->m_peer.peerAddr);
getpeername(sock, reinterpret_cast<sockaddr*>(&this->m_peer.peerAddr), &nameLength);
nameLength = sizeof(this->m_peer.selfAddr);
getsockname(sock, reinterpret_cast<sockaddr*>(&this->m_peer.selfAddr), &nameLength);
this->m_sock = sock;
this->m_connState = WOWC_CONNECTED;
}
// OFFSET: 0x004675F0
int32_t WowConnection::SendPacket(CDataStore* msg, int32_t headroom) {
int32_t size = msg->m_size;
@@ -490,6 +501,54 @@ void WowConnection::CheckConnect() {
this->Release();
}
// OFFSET: 0x00468580
void WowConnection::CheckAccept() {
for (int32_t i = 0; i < 1000; i++) {
NETADDR addr;
int32_t addrLength = sizeof(addr);
int32_t sock = static_cast<int32_t>(accept(this->m_sock, reinterpret_cast<sockaddr*>(&addr), &addrLength));
if (sock < 0) {
break;
}
if (WowConnection::s_verifyAddr) {
NETADDR peer;
int32_t peerLength = sizeof(peer);
getpeername(sock, reinterpret_cast<sockaddr*>(&peer), &peerLength);
if (!WowConnection::s_verifyAddr(&peer)) {
closesocket(sock);
continue;
}
}
WowConnection::MarkSocketId(sock);
u_long nonBlocking = 1;
ioctlsocket(sock, FIONBIO, &nonBlocking);
WowConnection* inbound = new (__FILE__, __LINE__) WowConnection(sock, &addr, this->m_response);
inbound->AddRef();
this->AddRef();
this->AcquireResponseRef();
WowConnectionResponse* response = this->m_response;
this->m_lock.Leave();
if (response) {
response->WCConnected(this, inbound, OsGetAsyncTimeMs(), &inbound->m_peer);
}
WowConnection::s_network->Add(inbound);
WowConnection::s_network->PlatformChangeState(inbound, inbound->m_connState);
inbound->Release();
this->m_lock.Enter();
this->ReleaseResponseRef();
this->Release();
}
}
// OFFSET: 0x00468790
void WowConnection::DoWrites() {
this->AddRef();
+1
View File
@@ -111,6 +111,7 @@ class WowConnection {
static void MarkSocketId(int32_t sock);
WowConnection(WowConnectionResponse* response, void (*threadInit)());
WowConnection(int32_t sock, const NETADDR* addr, WowConnectionResponse* response);
~WowConnection();
void AcquireResponseRef();
void AddRef();
@@ -558,6 +558,12 @@ void ClientConnection::Cancel(int32_t errorCode) {
LogConnectionStatus(this->m_statusOp, errorCode, 0, 0);
}
// VERIFY: 625995e6 auto
// OFFSET: 0x006B0EE0
void ClientServices::FileData(const uint8_t* data, uint32_t size) {
CGlueMgr::DownloadFeed(data, size);
}
// VERIFY: 74020b91 auto
// OFFSET: 0x006B0F40
const char* ClientServices::GetErrorToken(int32_t errorCode) {
@@ -574,6 +580,12 @@ int32_t ClientServices::CharacterValidateName(const char* name) {
return ValidateCharacterNameConst(s_locale, name, true, true, true, true, 0) + 87;
}
// VERIFY: ca1062a6 auto
// OFFSET: 0x006B0FC0
int32_t ClientServices::CharacterValidateDeclension(const char* name, const char* declension) {
return ValidateCharacterNameDeclension(s_locale, name, declension) + 87;
}
// VERIFY: ae977242 manual
// OFFSET: 0x006B1100
int32_t ClientConnection::PollStatus(WOWCS_OPS& op, const char** text, int32_t& result, int32_t& errorCode) {
@@ -1413,9 +1425,56 @@ void ClientConnection::RequestCharacterDelete(WOWGUID guid) {
this->Send(&msg);
}
// VERIFY: 0fdcb75a auto
// OFFSET: 0x006B1B80
void ClientRealmResponseAdapter::GameServerResult(RealmConnection* connection, const char* message1, const char* message2, const char* message3) {
}
// VERIFY: 13314496 auto
// OFFSET: 0x006B1B90
void ClientRealmResponseAdapter::LoginServerResult(LOGIN_STATE state, LOGIN_RESULT result, const char* message1, const char* message2, const char* message3) {
}
// VERIFY: 851669dd auto
// OFFSET: 0x00632050
void ClientRealmResponseAdapter::RealmListReceived(TSFixedArray<REALM_INFO>& realms) {
}
// VERIFY: af92e680 auto
// OFFSET: 0x00653A10
void ClientRealmResponseAdapter::MessageReceived(RealmConnection* connection, uint32_t message) {
}
// VERIFY: e5acd1b5 auto
// OFFSET: 0x006B1B90
void ClientRealmResponseAdapter::OnChatReceived(RealmConnection* connection, WOWGUID guid, const char* text, uint8_t type) {
}
// VERIFY: 01b28e4e auto
// OFFSET: 0x006B1B80
void ClientRealmResponseAdapter::OnAccountOnline(RealmConnection* connection, int32_t a2, WOWGUID guid) {
}
// VERIFY: 93d4ae81 auto
// OFFSET: 0x006B1BA0
void ClientRealmResponseAdapter::OnAFKMonitorInfoResponse(RealmConnection* connection, WOWGUID guid, int32_t a3, int32_t a4, int32_t a5, int32_t a6) {
}
// VERIFY: a13283da auto
// OFFSET: 0x00632050
void ClientRealmResponseAdapter::HandleConnect(RealmConnection* connection) {
}
// VERIFY: be0ed1e5 auto
// OFFSET: 0x00632050
void ClientRealmResponseAdapter::HandleDisconnect(RealmConnection* connection) {
}
// VERIFY: bbda4733 auto
// OFFSET: 0x00632050
void ClientRealmResponseAdapter::HandleCantConnect(RealmConnection* connection) {
}
// VERIFY: f198842b auto
// OFFSET: 0x006B1070
uint8_t ClientServices::GetCharacterRace() {