Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char __fastcall CWorld::EnterWorld(
- CWorld *this,
- CCreature *creature,
- FVector *AppearingPos,
- unsigned int AppearingZoneID,
- bool isByLogin,
- bool isByDirectMoveZone)
- {
- CWorld *v9; // rbx
- CCreature_vtbl *v11; // rax
- User *v12; // r14
- FVector *v13; // rax
- CWorld *v14; // rax
- CGeoData *v15; // rax
- CUserSocket *v16; // rsi
- CUserSocket_vtbl *v17; // rdi
- CWorld *v18; // rax
- FVector *v19; // rax
- FVector v20; // [rsp+40h] [rbp-48h] BYREF
- v9 = this;
- if ( !creature )
- {
- CLog::Add(&Log, 2, "creature null at file[%s], line[%d]", "world_server.cpp", 1962);
- return 0;
- }
- if ( !creature->m_data )
- {
- CLog::Add(&Log, 2, "creature data null at file[%s], line[%d]", "world_server.cpp", 1968);
- return 0;
- }
- v11 = creature->__vftable;
- creature->m_bIsRestarting = 0;
- if ( v11->IsPC(creature) )
- {
- creature->m_data->m_bIsActive = 1;
- v12 = creature->CastUser(creature);
- v12->SendUserInfo(v12, 0i64, 0i64);
- User::SendVitalityEffectInfo(v12, 0i64);
- if ( g_nCheckCastleId == 2 )
- {
- if ( v12->m_AreaMod.m_bIsInBattleField )
- {
- v13 = v12->GetPos(v12, &v20);
- v12->m_nCurCastleId = CCastle::GetBattleFieldCastleId(v13);
- }
- else
- {
- v12->m_nCurCastleId = 0;
- }
- }
- if ( isByLogin )
- {
- v12->OnActivate(v12);
- AppearingPos->z = AppearingPos->z + 5.0;
- if ( v12->m_data->m_moveType != CMT_FLY && !v12->m_AreaMod.m_bIsUnderWater )
- {
- v14 = CWorld::Inst();
- v15 = v14->GetGeo(v14);
- AppearingPos->z = (double)(int)CGeoData::FindGround(
- v15,
- (int)AppearingPos->x,
- (int)AppearingPos->y,
- (int)AppearingPos->z);
- CSharedObject::SetPos(v12->m_data, AppearingPos);
- }
- }
- User::SendQuestList(v12, 0i64);
- if ( g_bFreeOpenServer )
- {
- v16 = v12->GetSocket(v12);
- v17 = v16->__vftable;
- User::CheckPremiumType(v12, PUT_FREE_USER);
- v17->Send(v16, "chdc", 254i64);
- v9 = this;
- }
- }
- v18 = CWorld::Inst();
- if ( !CWorld::IsValidPosition(v18, (int)AppearingPos->x, (int)AppearingPos->y) )
- {
- CLog::Add(
- &Log,
- 2,
- "invalid position (%d, %d) at file[%s], line[%d]",
- (unsigned int)(int)AppearingPos->x,
- (int)AppearingPos->y,
- "world_server.cpp",
- 2029);
- return 0;
- }
- creature->m_nBeforeEnterWorldTick = GetTickCount();
- if ( !isByDirectMoveZone )
- {
- creature->AddRef(creature, "world_server.cpp", 2036i64, ORT_SERIALIZED_WORLD_THREAD);
- FVector::FVector(&v20, AppearingPos);
- CWorld::AsyncEnterWorld(v9, creature, v19, AppearingZoneID, isByLogin);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement