#pragma once #include "sgame.h" #include "SKMoveControler.h" #ifdef DISTANCE_VIEW #include "SGameWeatherAttr.h" #endif #ifdef CLOUD_LUA class SGameSky; #endif namespace env_fx { class SEnvironmentService; } const int TEST_WATER = 30; const int WATER_CNT = 5; struct NX3LIGHT_ELEMENT; class CTerrainSeamlessWorldInfo; class SGameWorld : public SGame { public: SGameWorld(SGameManager* pGameMng, int nGameType, class K3DRenderDeviceDX *pRenderDevice, class SSoundManager* pSoundMng, class KTextureManager * pTextureMng, class KNX3Manager * pNX3Mng, SGameMilesSoundMgr* pMSoundMgr ); virtual ~SGameWorld(void); virtual void ApplyOption( int nOptionType ); virtual void ToggleHelpWindow(); /// 기본 Load, 지형, 캐릭터, 프랍, 건물, NPC등등... virtual void Load(); virtual void AssistTarget( AR_HANDLE handle ); virtual void AfterRender( unsigned long uRenderBitVector ); virtual bool Render( unsigned long uRenderBitVector, KViewportObject** ppViewPortList, int nViewportCount ); virtual bool Process( DWORD time, unsigned long uProcessBitVector=0 ); virtual void *Perform( KID id, KArg& msg ); virtual void AddChatMessage( const char * pStr ); /// 게임내 공지 채팅만 출력, kappamind. virtual void AddNoticeMessageOnly( const char * pStr ); void AddDebugMessage( const char * pStr, ... ); virtual void RqChatting( int nChatType, const char * pName, const char * pStr ); virtual void AddAction( struct SGameMessage* pMsg ); virtual void AddChaosEffect( int nChaosCnt ); virtual int AddOtherEffect( int nFxID, struct OtherFxData* fxdata ); virtual void EndOtherEffect( int nFXID ); virtual void SetPKMode( bool bMode ); //소환수 관련 virtual void AddSummon( class SGameAvatarEx * pSummon, struct SMSG_ENTER* pEnterMsg ); virtual void DelSummon( AR_HANDLE hCreature ); virtual void LeaveSummon( AR_HANDLE hLeaveHandle ); virtual void EvolutionSummon( struct SMSG_SUMMON_EVOLUTION* pMsg ); // sonador 10.2.1 팻 시스템 구현 // method for pet system /// if there exists a local pet has the handle which has passed through, return it's data structure virtual struct DATA_PET* IsLocalPet( AR_HANDLE handle ); /// 현재 소환되어 있는 팻인가? SGameAvatarEx* IsSummonPet( AR_HANDLE handle ); /// 로컬 팻우리인가? 그렇다면, 해당 데이터를 반환한다. DATA_PET* IsLocalPetCage( AR_HANDLE handle ); /// add pet whose master is local player virtual void AddPet( class SGameAvatarEx* pet, struct SMSG_ENTER* enterMsg ); /// remove pet whose master is local player virtual void RemovePet( AR_HANDLE handle ); /// 스킬프랍 관련 virtual void AddSkillProp( class SGameAvatarEx * pSkillProp ); /// 콘솔 치트 virtual void OnSysCommand( const char *pChat, std::vector< std::string > & vToken ); virtual void ProcConsole( struct SGameMessage * pGameMsg ); virtual void ProcMsgAtStatic( struct SGameMessage * pGameMsg ); /// 아이템 떨구기 virtual void DropItem( AR_HANDLE handle ); //Network virtual bool onLeave( struct _Object *pPtr ); ///< 자신이 알아서 Leave /// 바닥 Mesh virtual void GetNearVertices( float x, float y, K3DVertex* pGetVertices ) const; virtual void GetNearVertices( float x, float y, int cx, int cy, K3DVertex* pGetVertices ) const; virtual void GetTerrainTriangle( float x, float y, K3DVector& v1, K3DVector& v2, K3DVector& v3 ) const; /// 지형 높이 virtual bool GetHeight( const float x, const float y, float& out, WORD& wTile ); virtual bool GetOnlyTerrainHeight( const float x, const float y, float& out ); virtual class CTerrainProp* GetTerrainProp( const float x, const float y, float& out ); /// 이동하는 위치 표시 virtual void SetMoveTargetPos( const float x, const float y, const float z, bool bChase = false ); virtual bool IsBlockedAttribute( const float x, const float y ); virtual void SetViewPort( class SGameViewPort* pViewPort ); virtual void SetNet( struct ArcadiaClient * pObject ); virtual void CorrectivePosition( K3DVector & pos, K3DVector & newpos ); //Sound virtual int StartSound( const char * pSoundName ); virtual int StartSound( SGameAvatarEx* pCaster, const char * pSoundName, K3DVector pos, bool bUse3D, int nVolume, bool bLoop, bool bSoundOption[SOUND_OP_MAX] ); virtual int StartSound( const char * pSoundName, K3DVector pos ); virtual void StopSound( const char * pSoundName, int nPlayIdx ); virtual void OnSkillDamage( AR_HANDLE caster, AR_HANDLE target, struct SGameMessage* pDamage ); virtual void OnDamage( AR_HANDLE caster, AR_HANDLE target, struct SGameMessage* pDamage ); virtual void OnDotDamage( struct SMSG_DAMAGE* pDamage, bool bFinalDmg = false ); virtual void OnDisplayDamage( struct SMSG_DAMAGE* pDamage ); virtual void OnUISync( AR_HANDLE caster, AR_HANDLE target ); virtual void OnDead(); virtual void SendGameMsg( struct SGameMessage * game_msg ); virtual unsigned char GetGameObjectType( AR_HANDLE objHandle ); virtual SGameObject* GetGameObject( AR_HANDLE objHandle ); /// 아이템 오브젝트 중에서 // sonador #2.1.2.4.3 팻 조작 UI 연동 virtual SGameObject* GetItemObject( K3DVector & pos, float & fDist, int nItemType, float fLimitDistance = 9999.f ); virtual SGameObject* GetMobObject( K3DVector & pos ); //몹 중에서 virtual SGameObject* GetGameTransportCreatureObject( AR_HANDLE objHandle ); virtual void GetItemObjects_For_PetAutoGather( const K3DVector& center, float fLimitRange, std::vector& vecResult, const K3DVector& dist_pos, std::vector& vecDist, int nMaxCount ); virtual void Rq_TakeItem( AR_HANDLE objHandle ); virtual void Rq_PutOnOffItem( AR_HANDLE hTarget, AR_HANDLE hItem, int nPosition ); virtual bool Rq_ChagePKMode( bool bOnOff ); virtual void Get2DPos( K3DVector & pos, K3DVector & _2Dpos ); virtual void SetPlayerAttack( class SGameAvatarEx * pTarget ); virtual struct DATA_CREATURE * IsLocalCreature( AR_HANDLE handle ); virtual SGameAvatarEx* IsSummonCreature( AR_HANDLE handle ); /// Skill virtual bool UseSkill( AR_HANDLE caster, int nSkillId, int nSkill_Lv=1, AR_TIME cast_time=1 ); /// 게임 옵션 관련 virtual void WarpComplete( struct SGameMessage * pMsg ); void AfterWarpComplete(); virtual void Game_LensFlare ( BOOL bFlag ); #ifdef _DEV_AURORA virtual void Game_Aurora_ON( float fVisibility, float fAngle, float fScale, float fHeight, DWORD dwOldTime ); // * bintitle virtual void Game_Aurora_OFF(); // * bintitle #endif virtual void Game_Aurora_Vis ( int nAurora, float fVisibility ); virtual void Game_Aurora_Angle( int nAurora, float fAngle ); virtual void Game_Aurora_Scale( int nAurora, float fAngle ); virtual void Game_Aurora_Height( int nAurora, float fHeight ); virtual void Game_Cloud ( BOOL bFlag ); virtual void Game_Thunder ( BOOL bFlag ); virtual void Game_Lightning ( BOOL bFlag ); virtual void Game_Weather ( BOOL bFlag ); virtual void Game_Prop ( BOOL bFlag ); virtual void Game_Effect ( BOOL bFlag ); virtual void Game_Sound ( BOOL bFlag ); virtual void Game_Music ( BOOL bFlag ); virtual void Game_Resolution ( int nResolution ); virtual void Game_FSAA ( int nSize ); virtual void Game_Cloud_vis ( float fVisibility ); virtual void Game_Cloud_speed( float fSpeed ); virtual void Game_Camera_fov ( float fFov ); virtual void Game_Mip_Range ( float fMipRange ); virtual void Game_Mip_Bias ( float fMipBias ); virtual void Game_Sky_Color ( int nR, int nG, int nB, int nA ); virtual void Game_Fog_Color ( int nR, int nG, int nB, int nA ); virtual void Game_Target_CamPos( int nX, int nY, int nZ ); virtual void Game_Light ( int type, K3DColor col ); virtual void Game_Light_Pos ( int nX, int nY, int nZ ); virtual void Game_Light_Dir ( float fX, float fY, float fZ ); virtual void Game_Fog_Height_Start( float fUnit ); virtual void Game_Fog_Height_End ( float fUnit ); virtual void Game_Fog_Linear_Start( float fUnit ); virtual void Game_Fog_Linear_End ( float fUnit ); virtual void Game_Sky_Color_Start( int nR, int nG, int nB ); virtual void Game_Sky_Color_Mid ( int nR, int nG, int nB ); virtual void Game_Sky_Color_End ( int nR, int nG, int nB ); virtual void Game_Sky_Color_MaxHeight( float fMaxHeight ); virtual void Game_Sky_Color_MidHeightPercent( float fMidHeightPercent ); virtual void Game_Sky_Color_MinHeight( float fMinHeight ); virtual void Game_Cloud_Color( int nR, int nG, int nB, int nA ); virtual void Game_Terrain_Specular( float fSpecular ); virtual void Game_CharSkin_Color( float fAmbiant, float fDiffuse ); virtual void Game_DryWet_Volume( float fDryVol, float fWetVol ); virtual void Game_Effect_Light( int type, K3DColor col ); /// 공격 가능 한가? virtual bool IsAttack(class SGameAvatarEx* pPickObject, int nSkillID = 0); //virtual bool IsAttack( class SGameAvatarEx * pPickObject ); /// UI virtual void SetUI_TargetActiveInfo( AR_HANDLE handle, int nType ); virtual void SetRenderFlag( int nFlag ); /// 현재 점과, 목표 점 사이 중, 유효 목표 점을 계산 해준다. virtual K3DVector GetCalculatePos( K3DVector & cur_pos, K3DVector & tar_pos ); // Send commands to the Local Player and Local Creature virtual void AddGameInput( class SGameInput * pInput ); //#ifndef NDEBUG //디버깅 용 /// 크리쳐에게 직접 내림. void AddGameCreatureInput( class SGameInput * pInput ); //#endif virtual void StopProcess(); /// 크리처 스크립 명령어 void SendCreatureCmdScript( STRUCT_CREATURE_CMD_SCRIPT &sCCmdScr ); int GetSelectedState( AR_HANDLE handle, GET_PLAYER_INFO nInfo ); /// { [soandor] 환경값 설정 관련, [sonador] 날씨 스크립 명령어 int GetWeatherTheme() const; void SetWeatherTheme( env_fx::SWeatherInfo* pInfo ); void SetThunderAttribute( env_fx::SThunderAttr* pAttr ); void SetLightningAttribute( env_fx::SLightningAttr* pAttr ); void SetEnvironmentConfigMode( bool mode ); // } #ifdef DISTANCE_VIEW env_fx::SSkyBoxAttr* GetSkyThemeInfo() const; void SetSkyThemeInfo( env_fx::SSkyBoxAttr* pAttr ); env_fx::SDistanceViewAttr* GetDistanceViewInfo() const; void SetDistanceViewInfo( env_fx::SDistanceViewAttr* pDistanceViewInfo ); bool ChangeDistanceView( int local_id ); #endif #ifdef CLOUD_LUA_RELOAD void Game_ReloadCloudLua(); #endif #ifdef CLOUD_LUA SGameSky* GetSky() { return m_pSky; } #endif void SetGameTime( struct SMSG_GAME_TIME* pMsg ); void SetTime(); void LocalProcess(); void SetChangeLocation( struct SMSG_CHANGE_LOCATION* pMsg ); void auto_graphic( int nLevel ); /// 길 찾기 관련 typedef std::vector< X2D::Point > PATH; virtual bool CollisionToLine( const K3DVector& vStart, const K3DVector& vEnd ); virtual void FindDetour( const K3DVertex& vStart, const K3DVertex& vEnd, PATH& vPath, bool bRestraint, bool bChase, bool bIsPlayer ); //virtual bool MoveDetour(K3DVertex& vtMovePos); //virtual bool IsMovingDetour(); //virtual bool IsChasing(); //virtual size_t GetDetourSize(); //virtual bool GetDetourPoint(size_t index, int& x, int& y); //virtual int GetDetourStep(); /// 지역 관련 void SetLocalInfo( int nLocalID ); void SetWorldInfo(); void SetTempEnv(); void ActivateTimeProcess( bool bTimeProcess ) { m_bTimeProcess = bTimeProcess; } void SetWeather( int nWeather ) { m_nWeatherID = nWeather; } void SetWorldID( int nWorldID ) { m_nSLocationID = nWorldID; } int GetWorldID() { return m_nSLocationID; } int GetWeather() { return m_nWeatherID; } int GetWorldClientID() { return m_nCLocationID; } int GetPreWorldID() { return m_nPrevSLocationID; } const CTerrainSeamlessWorldInfo* GetSeamlessWorldInfo() const; void SetTargetModel ( bool bTargetModel ) { m_bTargetModel = bTargetModel; } /// 저사양 물관련 void LQWaterProcess(); void AutoMove(); void ResetAutoMoveMode(); void AutoFollowMode(); void ResetAutoFollowMode(); int GetPlayerCurrentLocation() const { return m_nCurrentLocation; } void SetPlayerCurrentLocation( int nLocation ) { m_nCurrentLocation = nLocation; } bool IsDungeonSiege(); bool CheckPlayerMountLocation(); /// 현재 지형 virtual int GetCurrentLocation() { return GetPlayerCurrentLocation(); } void GetCurrentEnvironmentInfo( int& nWorldID, int& nCurTime, int& nWeatherID ) { nWorldID = m_nCurrentLocationID; nCurTime = m_nCurrTime; nWeatherID = m_nWeatherID; } void GetTerrainVisibleDistance( K3DVector & vCameraPos, float & fTerrainVisibleDist ); bool IsPartyRaidMemeber( AR_HANDLE hTarget ); virtual void PlayerInsideWaterExistence( K3DVector & vPlayerPosition, bool & bInWater ); void SetGameDryVolume( float fVol ) { m_fDryVolume = fVol; } void SetGameWetVolume( float fvol ) { m_fWetVolume = fvol; } float GetGameDryVolume() { return m_fDryVolume; } float GetGameWetVolume() { return m_fWetVolume; } void GameGraphicOptionForEvScene( bool bEnable, bool bApplyOptionEnviroment = false ); void SetRenderOtherPlayer( int nRender ); bool PlayerInTown( SGameAvatarEx* pPlayer ); void activeRegionSkillTargetFx(struct SIMSG_UI_ACT_USESKILL const& msg); /// 2010.10.13 - prodongi void activeReginSkillScaleFx(struct SIMSG_UI_ACT_USESKILL const& msg); void setFixedTerrainDistance(int dbFixedTerrainDistance); /// 2011.03.11 - prodongi void checkFixedTerrainDistanceRatio(float& ratio) const; bool getIsTaming() const; /// 2011.01.20 - prodongi void sendSwapEquipPendMessage(); /// 2011.07.21 무기 교체 패킷을 서버에 전송 redmine #17805 - prodongi virtual class CTerrainMapEngine* getTerrainMapEngine() const; virtual void stopKMove(); bool GetResetTargetList () { return m_bIsResetTargetList; } void SetResetTargetList ( bool bIsResetTargetList ) { m_bIsResetTargetList = bIsResetTargetList; } protected: void initCamera( const char * pFileName ); void SetGameCameraforFile( const char* pFileName ); void initLoadModel(); void Init(); void Destroy(); void applyOptionEnviroment(); void applyOptionPlay(); void applyOptionWater(); void AllDelEffect(); void CheckEffect(); void ChangeMusic(); void LoadCharacter_Light(); void ShowInterface( bool bShow ); void SetSoundPosition( float lis_x, float lis_y, float lis_z, float x, float y, float z, bool bNeedPosUpdate = true ) const; void SetTargetAttack( class SGameAvatarEx * pPickObject ); /// Login 후 처리~ void After_Login( struct SMSG_LOGIN* pMsg ); /// Result 후 처리~ void After_Result( struct SMSG_RESULT* pMsg ); /// Leave 후 처리 void After_Leave( struct SMSG_LEAVE* pMsg ); void After_DropResult( struct SMSG_ITEM_DROP* pMsg ); void After_WearInfo ( struct SMSG_ITEM_WEAR* pMsg ); void After_Inventory ( struct SMSG_ITEM_INVEN* pMsg ); /// Cheat void After_Warp ( struct SCMSG_WARP* pMsg ); void After_Chatting( struct SMSG_CHATTING* pMsg ); /// 게임 지원 virtual int GetAttrCellLength(); //KeyBoard void ProcHotKeyEx ( struct SIMSG_HOTKEY_EX* pMsg ); void ProcKeyDown ( struct SIMSG_KEYDOWN* pMsg ); //Mouse : 주로 카메라~ bool ProcMouseMove ( struct SIMSG_MOUSEMOVE* pMsg ); ///< 카메라가 바뀌면 true 리턴 void ProcMouseWheel ( struct SIMSG_MOUSEWHEEL* pMsg ); void ProcLbuttonUp ( struct SIMSG_LBUTTONUP* pMsg ) {} void ProcLbuttonDown ( struct SIMSG_LBUTTONDOWN* pMsg ); void ProcLbuttonDblclk( struct SIMSG_LBUTTONDBLCLK* pMsg ); void ProcMbuttonUp ( struct SIMSG_MBUTTONUP* pMsg ) {} void ProcMbuttonDown ( struct SIMSG_MBUTTONDOWN* pMsg ) {} void ProcMbuttonDblclk( struct SIMSG_MBUTTONDBLCLK* pMsg ) {} void ProcRbuttonUp ( struct SIMSG_RBUTTONUP* pMsg ) {} /// 2010.10.13 - prodongi void ProcRbuttonDown ( struct SIMSG_RBUTTONDOWN* pMsg ); void ProcRbuttonDblclk( struct SIMSG_RBUTTONDBLCLK* pMsg ) {} void CheckCameraMove( K3DVertex vtxPrevCamOrgPos ); void SetMinimapInfo( K3DVector vecPos ); void LoadWayPoint( K3DVector vPos ); K3DVector* GetWayPoint( int& nWayPointID ); void OnCameraEffect( struct SGameMessage* pDamage ); void processEffectLight(); void SetNamePanelViewMatrix(); void ItemMouseOverCheck(); void sendMapChange( const struct WorldLocationBase* pLocation ); void CheckTargetModelDistance( const K3DVector & vPosition ); void PlayerMoveTargetPosition( class SGameAvatarEx * pPickObject ); void SoundPerformanceTest( const char* szFileName ); bool CheckUIWindowOpened(); void LoadEnvironmentScript(); // [sonador] /// 2010.10.12 범위 스킬 타겟 - prodongi void procRegionSkillTargetFx(); void renderRegionSkillTargetFx(KViewportObject* viewPort); /// 2010.10.13 - prodongi void inactiveRegionSkillTargetFx(); /// 2010.10.13 - prodongi void sendRegionSkillTargetFxMsg(); /// 2011.06.30 커스텀 카메라 값 저장/로드 - prodongi void loadCustomCameraValue(); void saveCustomCameraValue(); /// 2011.11.09 worldPos로 월드의 preloading distance를 구한다 - prodongi int getPreloadingDistance(int worldPosX, int worldPosY); void setPickObject(SGameAvatarEx* pickObject, bool isAttack); void cancelCasting(); //Test 용------------------------------------------------------------------------ //물 테스트 class SGameWater* m_pWater[TEST_WATER]; class K3DTexture* m_pWaterBumpTex; class K3DIndexBuffer* m_pWaterIB; class SGameUVWrap* m_pWrap; //------------------------------------------------------------------------------- //보관 한 후 맵 로딩이 완료 되면, 로딩한다. std::queue m_vKeepingList; ///< Game Msg 보관; bool m_bIsLogined; class SGameSky* m_pSky; ///< 하늘 테스트 class SGameLensFlare* m_pLensFlare; ///< 렌즈 플레어 테스트 class SGameWeatherService* m_pWeatherService; ///< [sonador]날씨 효과 class SWayPoint* m_pWayPoint; ///< 자동이동 관련 // TODO : 물테스트 class SGameLowQualityWater* m_pLowQualityWater; K3DVector m_vPositionForWater; ///< 물을 위한 위치값 K3DMatrix m_TargetMat; class KSeqModel* m_pTargetModel; ///< 이동 위치 표시 bool m_bTargetModel; // class KSeqModel* m_pModel_Load; class SGameSelectTargetFx* m_pSelectTargetFx; ///< 타겟에 마우스를 올려놓았을때 나오는 이펙트 class SGameSelectTargetFx* m_pSelectTargetOnFx; ///< 타겟을 완전 선택했을때 나오는 이펙트 bool m_bSelectTarget; class cGameRegionSelectTargetFx*m_regionSkillTargetFx; /// 2010.10.12 범위 스킬 타겟 prodongi bool m_renderRegionSkillTargetFx; class SGameSelectTargetFx* m_pRegionSkillScaleFx; ///< 범위 스킬 사용 시 나오는 이펙트 bool m_bRenderUseRegionSkill; // 범위 스킬을 사용했는지.. /// 2011.03.10 디자이너가 특정한 월드는 가시거리(포그 등등)를 고정시킬 필요가 있는데, 이럴 때 쓰임, - prodongi bool m_isFixedTerrainDistance; /// 2011.03.10 - prodongi float m_fixedTerrainDistanceRatio; /// 2011.03.10 0.0f ~ 1.0f - prodongi int m_fixedTerrainDistance; class CTerrainMapEngine* m_pTerrainMapEngine; ///< 지형 엔진 int m_nTerrainVisibleDistOption; POINT m_ptOldPoint; DWORD m_dwEEffectLight_Live; DWORD m_nEffectLight_MaxLive; struct K3DLight * m_pEffectLight; ///< 타격감 이펙트 용 라이트 K3DColor m_EffectLightDiff; K3DVector m_EffectLightPos; struct K3DLight * m_pTerrainLight; ///< 타격감 이펙트 용 라이트 struct K3DLight * m_pAvatarLight; ///< 타격감 이펙트 용 라이트 class SGameSystem* m_pGameSystem; ///< GameSystem class SCommandSystem* m_pCommandSystem; ///< CommandSystem DWORD m_dwFindTargetTime; public: SCommandSystem* GetCommandSystem() { return m_pCommandSystem; } ///< CommandSystem class SGameCamera * m_pGameCamera; protected: // struct NX3LIGHT_ELEMENT* m_pCharacterLight; DWORD m_dwPrevProcessTime; DWORD m_dwResEventTime; ///< 리소스 이벤트 시간 DWORD m_dwFPSTime; ///< 지난 시간 DWORD m_dwFadeTime; ///< Fade Time float m_fFade_Visibility; ///< Fade In/Out //카메라 제어 옵션 DWORD m_dwCameraVibrateVar; ///< 카메라 진동용 변수 DWORD m_dwCameraVibrateTimeDueTime; ///< 이때까지 카메라 진동함. float m_fDeltaX; float m_fDeltaY; DWORD m_dwSkyPosSetTime; ///<하늘의 위치를 설정 할 주기 DWORD m_dwLoadDelay; BOOL m_bIsRender; ///< Login인 안되면, Render를 호출 하지 않는다. 좀더 좋은 방법??? int m_nAttackLimit; int m_nCell_Size; bool m_bTerrainProc; bool m_bTerrainRender; bool m_bSpecular; bool m_bHDR; //Local Player On/Off 옵션 BOOL m_bLocalRender; KColor m_FillColor; KColor m_FogColor; // { [sonador][COLLIDABLE_CAMERA] class IGameCameraAnimator* m_pCameraAnimator; // } K3DMatrix m_matShadowUV; //Height Fog float m_fHeightFog_Start; float m_fHeightFog_End; float m_fLinearFog_Start; float m_fLinearFog_End; bool m_bIsCustomFog; class K3DBoundRotCube * m_bCube[WATER_CNT]; ///< 임시 물 상자 //Sky Color K3DColor m_Sky_Color_Start; K3DColor m_Sky_Color_Mid; K3DColor m_Sky_Color_End; float m_fSkyColorMaxHeight; float m_fSkyColorMinHeight; float m_fSkyMidHeightPercent; float m_fTerrainSpecular; float m_fCharSkinAmbiantFactor; float m_fCharSkinDiffuseFactor; float m_fDryVolume; float m_fWetVolume; class KWireUtilPrimitive * m_pWireLen; bool m_bTimeProcess; DWORD m_dwStartEnvLerpTime; ///< 지역이나 월드가 변경됐을때 time_t m_nGameTime; AR_TIME m_nArGameTime; int m_nRefGameTime; ///< 치트용 int m_nIncGameTime; ///< 치트용 int m_nCurrTime; int m_nWeatherID; ///< 날씨 아이디 int m_nSLocationID; ///< 서버 보내준 지역 아이디 int m_nPrevSLocationID; ///< 서버 보내준 전 지역 아이디 int m_nCLocationID; ///< 클라이언트에서 검색된 지역 아이디 DWORD m_dwRequestTimeLc; // Region change request refresh time on the server bool m_bChangeLocation; ///< 지역이나 월드가 변경됐을때 #ifdef _EDIT_ENVIRONMENT_ K3DColor m_tempDiffuse; K3DColor m_tempSpecular; K3DColor m_tempAmbient; public: #endif /// 월드에서 지역으로, 지역에서 월드로 보간될때 현재 환경 값 저장 변수들 struct Environment_Info { KColor m_FogColor; K3DColor m_Sky_Color_Start; K3DColor m_Sky_Color_Mid; K3DColor m_Sky_Color_End; float m_fHeightFog_Start; float m_fHeightFog_End; float m_fLinearFog_Start; float m_fLinearFog_End; K3DColor m_Light_s; K3DColor m_Light_a; K3DColor m_Light_d; KColor m_CloudColor; float m_fTerrainSpecular; float m_fCharSkinAmbiantFactor; float m_fCharSkinDiffuseFactor; float m_fDryVolume; float m_fWetVolume; // Aurora. *bintitle float m_fAuroraTransparency; float m_fAuroraScale; // 크기 보간이 필요한가..? float m_fAuroraAngle; // 0 ~ 360 사이. float m_fAuroraHeight; Environment_Info() { m_FogColor = KColor( 1, 1, 1, 1 ); m_Sky_Color_Start = K3DColor( 1.f, 1.f, 1.f, 1.f ); m_Sky_Color_Mid = K3DColor( 1.f, 1.f, 1.f, 1.f ); m_Sky_Color_End = K3DColor( 1.f, 1.f, 1.f, 1.f ); m_fHeightFog_Start = 1.f; m_fHeightFog_End = 1.f; m_fLinearFog_Start = 1.f; m_fLinearFog_End = 1.f; m_Light_s = K3DColor( 1.f, 1.f, 1.f, 1.f ); m_Light_a = K3DColor( 1.f, 1.f, 1.f, 1.f ); m_Light_d = K3DColor( 1.f, 1.f, 1.f, 1.f ); m_CloudColor = KColor( 1, 1, 1, 1 ); m_fTerrainSpecular = 0.f; m_fDryVolume = 0.0f; m_fWetVolume = 0.0f; // Aurora. m_fAuroraTransparency = 1.0f; m_fAuroraScale = 1.0f; m_fAuroraAngle = 0.0f; m_fAuroraHeight = 1.0f; }; void SetFogColor( KColor& color ) { m_FogColor = color; } void SetSkyColor( K3DColor& SColor, K3DColor& MColor, K3DColor& EColor ) { m_Sky_Color_Start = SColor; m_Sky_Color_Mid = MColor; m_Sky_Color_End = EColor; } void SetHeightFogStartEnd( float fSFog, float fEFog ) { m_fHeightFog_Start = fSFog; m_fHeightFog_End = fEFog; } void SetLinearFogStartEnd( float fSFog, float fEFog ) { m_fLinearFog_Start = fSFog; m_fLinearFog_End = fEFog;} void SetLight( K3DColor& SLight, K3DColor& ALight, K3DColor& DLight ) { m_Light_s = SLight; m_Light_a = ALight; m_Light_d = DLight; } void SetCloudColor( KColor& color ) { m_CloudColor = color; } void SetTerrainSpecular( float fSpecular ) { m_fTerrainSpecular = fSpecular; } void SetDryWetVolume( float fDryVol, float fWetVol ) { m_fDryVolume = fDryVol; m_fWetVolume = fWetVol; } void SetCharSkinColor( float fAmbiant, float fDiffuse ) { m_fCharSkinAmbiantFactor = fAmbiant; m_fCharSkinDiffuseFactor = fDiffuse; } K3DColor& GetFogColor() { static K3DColor color; color = m_FogColor; return color; } // Aurora. void SetAurora( float fTransparency, float fScale, float fAngle, float fHeight ) { m_fAuroraTransparency = fTransparency; m_fAuroraScale = fScale; m_fAuroraAngle = fAngle; m_fAuroraHeight = fHeight; } void SetAuroraTransparency( float ft ) { m_fAuroraTransparency = ft; } void SetAuroraScale( float fs ) { m_fAuroraScale = fs; } void SetAuroraAngle( float fa ) { m_fAuroraAngle = fa; } void SetAuroraHeight( float fh ) { m_fAuroraHeight = fh; } K3DColor& GetSkyColorStart() { return m_Sky_Color_Start; } K3DColor& GetSkyColorMid() { return m_Sky_Color_Mid; } K3DColor& GetSkyColorEnd() { return m_Sky_Color_End; } float GetHeightFogStart() { return m_fHeightFog_Start; } float GetHeightFogEnd() { return m_fHeightFog_End; } float GetLinearFogStart() { return m_fLinearFog_Start; } float GetLinearFogEnd() { return m_fLinearFog_End; } K3DColor& GetLightSpecular() { return m_Light_s; } K3DColor& GetLightAmbiant() { return m_Light_a; } K3DColor& GetLightDiffuse() { return m_Light_d; } float GetTerrainSpecular() { return m_fTerrainSpecular; } float GetCharSkinAmbiantFactor() { return m_fCharSkinAmbiantFactor; } float GetCharSkinDiffuseFactor() { return m_fCharSkinDiffuseFactor; } K3DColor& GetCloudColor() { static K3DColor color; color = m_CloudColor; return color; } float GetDryVolume() { return m_fDryVolume; } float GetWetVolume() { return m_fWetVolume; } #ifdef _EDIT_ENVIRONMENT_ void SetDryVolume( float fVol ) { m_fDryVolume = fVol; } void SetWetVolume( float fvol ) { m_fWetVolume = fvol; } #endif // Aurora. float GetAuroraTransparency() { return m_fAuroraTransparency; } float GetAuroraScale() { return m_fAuroraScale; } float GetAuroraAngle() { return m_fAuroraAngle; } float GetAuroraHeight() { return m_fAuroraHeight; } }; #ifdef _EDIT_ENVIRONMENT_ K3DColor GetSkyColorStart() { return m_Sky_Color_Start; } K3DColor GetSkyColorMid() { return m_Sky_Color_Mid; } K3DColor GetSkyColorEnd() { return m_Sky_Color_End; } K3DColor GetFogColor() { return K3DColor( m_FogColor ); } float GetSkyMidHeightPercent() { return m_fSkyMidHeightPercent; } float GetFogStart() { return m_fLinearFog_Start; } float GetFogEnd() { return m_fLinearFog_End; } float GetDryVolume() { return m_fDryVolume; } float GetWetVolume() { return m_fWetVolume; } void CopyLightInfoTempLight(); K3DColor GetLightDiffuse(); K3DColor GetLightSpecular(); K3DColor GetLightAmbient(); void SetLightDiffuse(K3DColor c); void SetLightSpecular(K3DColor c); void SetLightAmbient(K3DColor c); void SetSkyMidHeightPercent(float fPercent) { m_fSkyMidHeightPercent = fPercent; } bool m_bApplyEnvironmentCost; void SetApplyEnvironmentCost(bool b) { m_bApplyEnvironmentCost = b; } bool GetApplyEnvironmentCost() { return m_bApplyEnvironmentCost; } Environment_Info m_sEditEnvironment; SGameWorld::Environment_Info* GetEditEnvironment() { return &m_sEditEnvironment; } void EnvironmentSetGameDryVolume(float fDry); K3DColor GetCloudColor(); void SetCloudColor(KColor color); SGameWorld::Environment_Info* GetEnvironmentInfo(); void CopyEnvironmentInfo(); protected: bool m_bCopyEnvironmentParam; #endif Environment_Info m_Environment_Info; env_fx::SEnvironmentService* m_pEnvironmentService; struct EnvironmentConfigArgument { EnvironmentConfigArgument(); void ActivateConfigMode( bool activity ); void FixEnvProperty(); bool mConfigMode; bool mFixEnvProperty; struct tm mConfigModeTime; float mCapacity; }; EnvironmentConfigArgument m_EnvConfigArgument; bool _IsEnvironmentConfigMode() const { return m_EnvConfigArgument.mConfigMode; } int _getValidLocationID() const; float m_fGameLightAmbientFactor; // sonador 1.1.18 환경 효과 오류 수정 float m_fGameLightDiffuseFactor; // float m_fGameLightSpecularFactor; // float m_fGameFogDistanceFactor; // //int m_nDetourStep; bool m_bCreatureMove; //bool m_bRefreshDetour; bool m_bCameraCollision; //bool m_bIsChasing; //자동 이동 관련 bool m_bAutoMove; K3DVector m_vAutoMoveDir; K3DVector m_vTargetPos; bool m_bAutoFollowMode; AR_HANDLE m_hFollowTarget; bool m_bMoveTargetPos; //bool m_bHeightFog; DWORD m_dwFogMode; int m_nWarpX; int m_nWarpY; float m_fCamMaxDistRatio; K3DMatrix m_vNamePanelViewMatrix; DWORD m_dwMusicCheckTime; bool m_bIsAttackLocation; ///< 공격 가능 지역 인가? int m_Curlocation_type; ///< 현재 지역 종류 int m_nCurrentLocation; int m_nZoomMapType; ///< MiniMap, WorldMap 처리 int m_nCurrentLocationID; bool m_bEnableLightmap; DWORD m_dwGameSystemTime; DWORD m_dwLensFlareTime; std::string m_strCurrentMusic; DWORD m_dwEnvFxSoundTime; DWORD m_dwEnvFxSoundDelayTime; int m_nPrevEnvFxSoundIndex; std::string m_strCurEnvFxSoundName; int m_nCurEnvFxSoundID; int m_nLimitDisitance; //Loading Text Output // class SUILoaingTextOutWnd* m_pLoaingTextOutWnd; bool m_bIsResetTargetList; //TODO : 테스트 코드 /* class SGameEnvironmentMap* m_pGameEnvMap; class SGameWeatherFx* m_pGameWeatherFx; */ int m_nMusicFadeInTime; int m_nMusicFadeOutTime; int m_nBgmFadeInTime; int m_nBgmFadeOutTime; int m_nBmgVolume; float m_fCamera_Z_Offset; float m_fCameraDisRate; bool m_bCameraAutoRot; short m_nCameraAutoRotValue; DWORD m_dwRenderCheckTime; int m_nLoadFirst; bool m_bEnableGCOpForEvScene; struct SCMSG_WARP* m_pWarpMsg; bool m_bSendDummyMsg; std::vector m_vecEventAreaID; // Aurora. struct SAuroraData { float fVisibility; float fScale; float fHeight; float fAngle; void SetData( float Visibility, float Scale, float Height, float Angle ) { fVisibility=Visibility; fScale=Scale; fHeight=Height; fAngle=Angle; } }; SAuroraData m_pPrevAuroraData; SAuroraData m_pCurrAuroraData; int m_AuroraPrevIndex; // 이전 Aurora Index. int m_AuroraIndex; // 현재 지역에 설정된 Aurora Index. /// 2011.01.21 - prodongi /// active되는 프랍은 한번에 한개씩만 된다고 가정함... struct sActivatePropInfo { void set(DWORD totalAniTime, float playRate, AR_HANDLE handle) { m_curTime = 0; m_totalAniTime = totalAniTime; m_prop = handle; m_playRate = playRate; } float m_playRate; DWORD m_curTime; DWORD m_totalAniTime; AR_HANDLE m_prop; }; sActivatePropInfo m_activatePropInfo; void processActiveProp(DWORD elapsedtime); bool IsBlockedHotKey(); //2012. 2. 20 - marine 현재 사용될수 없는 단축키 인지 SKMoveControler m_kmoveControler; AR_HANDLE m_pickObject; K3DVector m_pickColor; bool m_bVisualDropItem; #ifdef _FOG_RANGE_ public: void CreateFogModel(); void DestroyFogModel(); void ProcessFogModel(DWORD dwTime); void SetPositionFogModel(); void SetFogModelSize(float fStartSize, float fEndSize); void ShowFogModel(bool bShow); void ShowEndFogModel(bool bShow); void ShowStartFogModel(bool bShow); bool GetFlagShowFogModel() { return m_bShowFogRange; } protected: bool m_bShowFogRange; bool m_bShowEndFogModel; bool m_bShowStartFogModel; KSeqModel* m_pModelFogEnd; // start fog model KSeqModel* m_pModelFogStart; // end fog model #endif };