Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void __fastcall CCreature::EnterWorldImpl(CCreature *this)
- {
- int v2; // r12d
- CSharedCreatureData *m_data; // rax
- CSharedCreatureData *v4; // rax
- CSharedCreatureData *v5; // rcx
- unsigned int v6; // r8d
- FVector *v7; // rax
- int z; // ecx
- CSharedCreatureData *v9; // rax
- int v10; // ecx
- __int64 v11; // rdx
- __int64 v12; // rax
- __int64 v13; // rbx
- CSharedCreatureData *v14; // rax
- __int64 v15; // rcx
- BOOL v16; // r8d
- CCreature_vtbl *v17; // rax
- CSharedCreatureData *v18; // rax
- __int64 m_Race; // rcx
- FVector *m_vPassingPos; // rbx
- __int64 v21; // rdi
- const FVector *v22; // rax
- CWorld *v23; // r14
- int v24; // esi
- unsigned int y; // edi
- unsigned int x; // ebx
- CGeoData *v27; // rax
- CWorld *v28; // rax
- int v29; // edi
- int v30; // ebx
- CGeoData *v31; // rax
- CGeoZone *Zone; // rax
- CGeoZone *v33; // rbx
- CSharedGeoZone *Sector; // rax
- int v35; // ebx
- double v36; // [rsp+38h] [rbp-D0h] BYREF
- double v37; // [rsp+40h] [rbp-C8h]
- FVector v; // [rsp+48h] [rbp-C0h] BYREF
- FVector v39; // [rsp+60h] [rbp-A8h] BYREF
- __int64 v40; // [rsp+78h] [rbp-90h]
- FVector v41; // [rsp+80h] [rbp-88h] BYREF
- FVector v42; // [rsp+98h] [rbp-70h] BYREF
- FVector v43; // [rsp+B0h] [rbp-58h] BYREF
- char v44[24]; // [rsp+C8h] [rbp-40h] BYREF
- char v45[24]; // [rsp+E0h] [rbp-28h] BYREF
- InfectedSkillType v46; // [rsp+F8h] [rbp-10h] BYREF
- v2 = 1;
- _InterlockedAdd(&g_nHeartbeatingCreatureNum, 1u);
- _InterlockedAdd(&g_nExistingCreatureNum, 1u);
- m_data = this->m_data;
- this->m_bIsFreezing = 0;
- m_data->m_nPKTimeStamp = 0;
- this->m_data->m_cIsGuilty = 0;
- v4 = this->m_data;
- this->m_bIsGMKill = 0;
- this->m_nDead = 0;
- v4->m_bGMInvisible = 0;
- this->m_data->m_nSoulShot = 0;
- this->m_data->m_nFishingShot = 0;
- this->m_data->m_bSpiritShot = 0;
- this->m_data->m_bCanBeResurrected = 1;
- this->m_data->m_bCanResurrection = 0;
- this->m_data->m_nResurrectExp = 0i64;
- this->m_data->m_nResurrectRatio = 0;
- this->m_data->m_dwResurrectTime = GetTickCount();
- this->m_data->m_MovingStatus = MSTE_NOT_MOVING;
- this->m_data->m_StopMode = STP_STAND;
- this->m_data->m_MoveMode = MT_FAST;
- v5 = this->m_data;
- if ( v5->m_moveType == CMT_FLY )
- v6 = 2;
- else
- v6 = 0;
- CVariableBitSet::SetIntValue_IfModifed(&v5->m_NeedUpdatePacketBitSet, (unsigned int *)&v5->m_Environment, v6, 0x53u);
- this->m_data->m_FirstAttackerServerID = 0;
- this->m_data->m_LastAttackerServerID = 0;
- this->m_BuilderCmdMod.m_nAbnormalChangeType = 3;
- *(_WORD *)&this->m_ItemMod.m_bOnlyUseEquipedWeaponActiveSkill = 0;
- this->m_ItemMod.m_bHpLimitBreak = 0;
- CCreature::InitializeSkillMod(this);
- *(_QWORD *)&this->m_AreaMod.m_bIsUnderMotherTree = 0i64;
- this->m_AreaMod.m_dSpeedModByArea = 1.0;
- *(_WORD *)&this->m_AreaMod.m_bWasFrozen = 0;
- *(_QWORD *)&this->m_AreaMod.m_bIsInBattleField = 0i64;
- *(_WORD *)&this->m_AreaMod.m_bWasUnderWater = 0;
- this->m_AreaMod.m_bIsNearUnderWater = 0;
- this->m_AreaMod.m_bIsInInstantSkill = 0;
- this->m_AreaMod.m_dHpRegenAreaBonus = 0.0;
- this->m_AreaMod.m_dMpRegenAreaBonus = 0.0;
- this->m_AreaMod.m_nLeavingMessageNO = 0;
- this->m_AreaMod.m_dHeightDamage = 0.0;
- CCreatureSkillDurationMod::Clear(&this->m_SkillDurationMod);
- *(_QWORD *)&this->m_inv.m_nEXPRuneCount = 0i64;
- this->m_inv.m_nRPRuneCount = 0;
- this->m_inv.m_RuneItemClassIds._Mypair._Myval2._Mylast = this->m_inv.m_RuneItemClassIds._Mypair._Myval2._Myfirst;
- v7 = this->GetPos(this, v44);
- v39.x = 0.0;
- z = (int)v7->z;
- this->m_nCurrentWeight = 0;
- *(_OWORD *)&v.y = 0i64;
- this->m_AreaMod.m_nWaterSurfaceHeight = z;
- FVector::operator=(&this->m_vSrcPos, (FVector *)&v.y);
- v40 = 0i64;
- *(_OWORD *)&v39.y = 0i64;
- FVector::operator=(&this->m_vMoveSkillDest, (FVector *)&v39.y);
- this->m_bDecExp = 1;
- this->m_nSetItemClassId = 0;
- std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>::clear(&this->m_mapNewSetItem);
- std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::allocator<std::pair<int const,int>>,0>>::clear(&this->m_mapShapeShiftedSetItem);
- v9 = this->m_data;
- v10 = 0;
- *(_WORD *)&this->m_bIsInitiativeViolet = 0;
- v11 = 0i64;
- this->m_dHPRegenModByWeight = 1.0;
- this->m_dMPRegenModByWeight = 1.0;
- this->m_dCPRegenModByWeight = 1.0;
- this->m_dSpeedModByWeight = 1.0;
- *(_QWORD *)&this->m_nEnergyCount = 0i64;
- this->m_dwFakeDeathStartTime = 0;
- v9->m_bIsSpoil = 0;
- this->m_data->m_nCanSweeper = 0;
- this->m_data->m_nSpoilerSmartID = 0;
- do
- *(&this->m_data->m_bIsPlunded + v11++) = v10++;
- while ( v10 < 2 );
- this->m_data->m_bIsSeed2 = 0;
- this->m_data->m_nCanHarvest = 0;
- this->m_data->m_nSowerSmartID = 0;
- this->m_data->m_dOverHitBonus = 1.0;
- this->m_maxCubic = 1;
- InfectedSkillType::InfectedSkillType(&v46);
- v13 = v12;
- this->m_InstantDurationSkill.pSkillInfo = *(const CSkillInfo **)v12;
- this->m_InstantDurationSkill.nStartTime = *(_DWORD *)(v12 + 8);
- this->m_InstantDurationSkill.bSelfCast = *(_BYTE *)(v12 + 12);
- this->m_InstantDurationSkill.nSourceCreatureId = *(_DWORD *)(v12 + 16);
- this->m_InstantDurationSkill.m_pChannellingSkillInfo = *(CSkillInfo **)(v12 + 24);
- std::list<int,std::xallocator<int>>::operator=(
- &this->m_InstantDurationSkill.m_SourceCreatureIds,
- (std::list<int,std::xallocator<int> > *)(v12 + 32));
- this->m_InstantDurationSkill.nDuration = *(_DWORD *)(v13 + 48);
- this->m_InstantDurationSkill.nReduceCount = *(_DWORD *)(v13 + 52);
- this->m_InstantDurationSkill.dReduceDamage = *(long double *)(v13 + 56);
- std::list<int,std::xallocator<int>>::~list<int,std::xallocator<int>>(&v46.m_SourceCreatureIds);
- this->m_InstantDurationSkill.pSkillInfo = 0i64;
- this->m_dSpiritShotHealBonus = 0.0;
- this->m_sNowSoulShot = 0;
- this->m_bIsSysMsg = 1;
- *(_WORD *)&this->m_bIsHP1SysMsg = 0;
- this->m_bIsNight = g_L2Time.m_bIsNight;
- v14 = this->m_data;
- if ( v14->m_dBaseHP * 0.3 < v14->m_dHP )
- {
- this->m_bIsLowHPLevel1 = 0;
- }
- else
- {
- this->m_bIsHP1SysMsg = 1;
- this->m_bIsLowHPLevel1 = 1;
- }
- if ( v14->m_dBaseHP * 0.6 < v14->m_dHP )
- {
- this->m_bIsLowHPLevel2 = 0;
- }
- else
- {
- this->m_bIsHP2SysMsg = 1;
- this->m_bIsLowHPLevel2 = 1;
- }
- this->m_dwMPowerStorage = 0;
- this->m_sPowerCount = -1;
- v15 = 0i64;
- this->m_bIsRestarting = 0;
- do
- *(&this->m_data->m_bIsFakeDeath + v15++) = 0;
- while ( v15 < 2 );
- this->m_data->m_nMaxMagicLevel = 0;
- if ( this->IsPC(this) )
- {
- v16 = this->m_nDownExp == 0;
- LABEL_19:
- CVariableBitSet::SetIntValue_IfModifed(
- &this->m_data->m_NeedUpdatePacketBitSet,
- (unsigned int *)&this->m_data->m_bIsAlive,
- v16,
- 0x61u);
- goto LABEL_20;
- }
- if ( !this->IsPet(this) )
- {
- this->m_nDownExp = 0i64;
- v16 = 1;
- goto LABEL_19;
- }
- CVariableBitSet::SetIntValue_IfModifed(
- &this->m_data->m_NeedUpdatePacketBitSet,
- (unsigned int *)&this->m_data->m_bIsAlive,
- this->m_bIsPetAlive == 1,
- 0x61u);
- this->m_bIsPetAlive = 1;
- LABEL_20:
- if ( this->IsPet(this) && !this->IsAlive(this) && this->m_nDeathCount > 0 )
- this->m_data->m_bDecayComplete = 1;
- this->m_bLeft = 0;
- *(_QWORD *)&this->m_nAuraTick = 0i64;
- *(_QWORD *)&this->m_nCommitTick = 0i64;
- _InterlockedExchange(&this->m_bParamChanged, 0);
- v17 = this->__vftable;
- this->m_nValidateChanged = 0x2000;
- *(_WORD *)&this->m_bAbnormalStatusChanged = 0;
- this->m_bValidateExChanged = 0;
- this->m_nValidateExChanged = 4;
- v17->SetInCombatMode(this, 0);
- this->m_nCombatModeTimeStamp = 0;
- this->m_nSummonLifeLastTick = GetTickCount();
- this->m_nBowDelay = 0;
- CIOObject::SetShortTimeStamp(&this->m_nBowDelay, 0);
- this->m_data->m_nLastAttackTick = 0;
- v18 = this->m_data;
- this->m_eDeadDamage = 1;
- CCreature::_AcquireSkills(
- this,
- (const std::vector<SkillAcquireInfo *,std::xallocator<SkillAcquireInfo *> > *)((char *)g_SkillAcquireDB.m_vectorClsSkill
- + 16 * v18->m_nClass
- + 8 * v18->m_nClass),
- 1,
- 0);
- m_Race = this->m_data->m_Race;
- CCreature::_AcquireSkills(
- this,
- (const std::vector<SkillAcquireInfo *,std::xallocator<SkillAcquireInfo *> > *)((char *)g_SkillAcquireDB.m_vectorRaceSkill
- + 16 * m_Race
- + 8 * m_Race),
- 1,
- 0);
- this->ValidateChanged(this, 0x2000);
- std::_Tree<std::_Tmap_traits<int,double,std::less<int>,std::xallocator<std::pair<int const,double>>,0>>::clear(&this->m_PledgeContributes);
- this->m_nPledgeContributeSaveTick = 0;
- m_vPassingPos = this->m_vPassingPos;
- *(_DWORD *)&this->m_nCurrentPassingPos = 0;
- v21 = 15i64;
- do
- {
- v22 = this->GetPos(this, v45);
- FVector::operator=(m_vPassingPos++, v22);
- --v21;
- }
- while ( v21 );
- CCreature::InitMes(this);
- if ( nHeartBeat != 666 )
- {
- CLog::Add(&Log, LOG_ERROR, (wchar_t *)L"nHeartBeat!=666!");
- CLog::Add(&Log, LOG_ERROR, (wchar_t *)L"nHeartBeat!=666!");
- CLog::Add(&Log, LOG_ERROR, (wchar_t *)L"nHeartBeat!=666!");
- CLog::Add(&Log, LOG_ERROR, (wchar_t *)L"nHeartBeat!=666!");
- CLog::Add(&Log, LOG_ERROR, (wchar_t *)L"nHeartBeat!=666!");
- nHeartBeat = 666;
- }
- v23 = CWorld::Inst();
- FVector::FVector(&v41, &this->m_data->m_Pos);
- v24 = (int)v41.z;
- FVector::FVector(&v42, &this->m_data->m_Pos);
- y = (int)v42.y;
- FVector::FVector(&v43, &this->m_data->m_Pos);
- x = (int)v43.x;
- v27 = v23->GetGeo(v23);
- this->m_data->m_bIsFreezed = CGeoData::IsField(v27, x, y, v24, GEO_FIELD_FREEZE);
- this->GetPos(this, (FVector *)&v36);
- v28 = CWorld::Inst();
- v29 = ((int)v37 + 0x40000) >> 15;
- v30 = ((int)v36 + 327680) >> 15;
- v31 = v28->GetGeo(v28);
- Zone = CGeoData::GetZone(v31, v30 + 10, v29 + 10);
- v33 = Zone;
- if ( Zone )
- {
- Sector = CGeoZone::GetSector(Zone, (unsigned __int8)((int)v36 >> 7), (unsigned __int8)((int)v37 >> 7));
- if ( Sector )
- CCreature::AreaCheckForEveryTick(this, v33, (CGeoSector *)Sector, -1);
- }
- v35 = nHeartBeat;
- if ( nHeartBeat > 0 )
- v2 = (int)(genrand64_real2() * (double)v35 + 1.0);
- else
- CLog::Add(&Log, LOG_ERROR, (wchar_t *)L"nHigh [%d] in Random", (unsigned int)nHeartBeat);
- CIOObject::AddTimer(this, v2 + nHeartBeat, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement