#pragma once #include "SUIDefine.h" #include "SChatType.h" #include "SGameWorldKeymapping.h" #include class SInventorySlot; class SUIDisplayInfo; struct SkillBaseEx; struct SMSG_DAMAGE; struct ItemBaseEx_info; struct SIMSG_UI_GETMANAGER; using std::string; extern int last_skill_request_time; extern int delay_after_skill_request; namespace rp { class CSkillTooltip; class CSkillFxDeco; class CSkillExSubject; class CAutoToolTip; // floyd 2009. 12. 22 /// register tag decorator for each system messge. namespace tag { struct DecoArg { DecoArg( std::string& _msg ) : msg ( _msg ) , damage( 0 ) , skill ( 0 ) { } SMSG_DAMAGE* damage; SkillBaseEx* skill; std::string& msg; }; class TagPipe { public: typedef void ( TagPipe::*DecorateFn )( const char*, DecoArg& ); struct Worker { Worker( DecorateFn fn, const char* tag ) : Fn( fn ), Tag( tag ) {} DecorateFn Fn; const char* Tag; }; friend struct Worker; typedef std::vector< Worker > worker_team_t; typedef std::map< int, worker_team_t* > pipeline_t; TagPipe(); ~TagPipe(); void addPipeLine( int msg, worker_team_t* workerTeam ); void run( int msg, DecoArg& arg ); void onCasterName( const char* tag, DecoArg& arg ); void onTargetName( const char* tag, DecoArg& arg ); void onTotalDamage( const char* tag, DecoArg& arg ); void onAddDamage( const char* tag, DecoArg& arg ); void onOnlyDamage( const char* tag, DecoArg& arg ); void onSkillDamage( const char* tag, DecoArg& arg ); void onSkillName( const char* tag, DecoArg& arg ); void onSkillLevel( const char* tag, DecoArg& arg ); void onIncreaseHp( const char* tag, DecoArg& arg ); void onIncreaseMp( const char* tag, DecoArg& arg ); void onIncreaseSp( const char* tag, DecoArg& arg ); void onSkillDamageSubAddDmg( const char* tag, DecoArg& arg ); // 2010.09.01 - prodongi void onSkillAddDamage( const char* tag, DecoArg& arg ); // 2010.09.01 - prodongi private: pipeline_t mPipeLine; }; } // namespace tag } // namespace rp class SUIDisplayInfo { // enum AttackType { Physical, Magic }; enum RecoveryType { HP=2, MP=4, SP=8 }; public: enum { enemy = 0, LocalPlayer = 1, ///< 자기자신 Party = 1<<1, ///< 파티원 Guild = 1<<2, ///< 던전시즈 중 길드원 NPC = 1<<3, ///< NPC Creature = 1<<4, ///< 소환된 크리처 PartyCreature = 1<<5, ///< 파티원 크리처 GuildCreature = 1<<6, ///< 던전시즈 중 길드원 크리처 }; enum { PARTY_STATE, GUILD_STATE, ALLIANCE_STATE }; public: SUIDisplayInfo(); virtual ~SUIDisplayInfo(); virtual void ProcMsgAtStatic( struct SGameMessage* pMsg ); virtual void Process( DWORD dwTime ); void ProcConsole( struct SGameMessage* pGameMsg ); public: void SetGameManager( class SGameManager* pGameManager ) { m_pGameManager = pGameManager; } bool InitData( bool bReload = false ); bool IsExistItem( int nItemCode ); bool IsExistInvenItem( int nItemCode ); bool GetControlPushState() { return m_bControlPush; } //servantes 2010.10.25 void SetControlPushState(bool b) { m_bControlPush = b; } // AziaMafia Zentrix Alt bool GetAltPushState() { return m_bAltPush; } //servantes 2010.10.25 void SetAltPushState(bool b) { m_bAltPush = b; } class SCreatureSlotMgr* GetCreatureManager() const; class SSkillSlotMgr* GetSkillSlotManager() const; class SPlayerInfoMgr* GetPlayerInfoManager() const; class SInventoryMgr* GetInventoryManager() const; // { [sonador] class SPetMgr* GetPetManager() const; void RefreshGaugeAndStatic( class KUIControlGauge* pGaugeControl, int nCurrent, int nMax, int nPer, DWORD dwFillTime ); void RefreshGaugeAndStaticByPercentage( class KUIControlGauge* pGaugeControl, int nPer, DWORD dwFillTime ); // #2.3.1.31 // Message output in chat void AddSystemMessage( const char* szMessage, int nChatTyp = CHAT_SYSTEM ); // Fraun performance tweak (removing useless string group) void AddCommandMessage( const char* szMessage ); std::string GetText( const char* szString, ... ); const char* GetStringMessage( int nTextID ); /*const char* GetStringMessage( const char* szKeyName );*/ void SetSysMsg( int nMsgType, __int64 nValue = -1, __int64 nValue2 = -1 ); void SetSysMsg( int nMsgType, const char* lpText ); void SetSkillSysMsg( int nMsgType, int nSkillID, int nLv ); void SetPartySysMsg( int nMsgType, const char* pName = NULL, const char* pItemName = NULL, const char* pItemCnt = NULL ); void StateDamageSysMsg( struct SIMSG_UI_DISPLAY_STATE_DMG_SYS_MSG* pStateDmg ); void SetBonusExpJpMsg( int nMsgType, int nPer, __int64 nExp, __int64 nJp ); unsigned char GetObjectType( AR_HANDLE handle ); // 공통 사용 함수 DWORD GetCurTime() const { return m_dwCurTime; }; //const char* GetJP( int* nJP ); /// 2011.04.28 jpToString 함수로 대체 - prodongi float GetPercent( int nCur, int nMax ); void GetPercentValue( int nCurValue, int nMaxValue, int* pOutExp, int* pOutRest ); std::string GetMotionAniName( int nID ); int IsFriend( AR_HANDLE Handle, unsigned char& rType ); int IsEnhanceAddCapability( int nItemID ) const; bool ShowMobHPMP( AR_HANDLE hTarget ); // 툴팁 std::string ConvertNumString( int value ) const; std::string ConvertDBString( int nId, int value, const char* tag=NULL, const char* c_key="#@value@#", bool bPlus=true ) const; std::string ConvertDBString( int nId, float value, int decimal=1, const char* tag=NULL, const char* c_key="#@value@#", bool bPlus=true ) const; std::string ConvertDBStringTime( int nId, float value, bool bPlus=true ) const; std::string GetStateToolTipText( int nStateID /* state code=상태이상 아이디 */, AR_TIME end_time, int nStateLevel, int nStateValue, bool bToggle, bool bDetail=true, bool bTime=true ); std::string GetStateBaseEffectCaseToolTipText( int nStateID, int nStateLevel, const CreatureAttribute& userAttr, const CreatureAttribute& itemAttr ); // sonador 10.4.2 지속효과 기본공격 반영률 관련 오류 수정 // 2010.05.17 - prodongi std::string GetStateCaseToolTipText( int nStateID, int nStateLevel, int skillLevel = 0 ) const; // std::string GetStateCaseToolTipText( int nStateID, int nStateLevel ); static std::string CheckPositiveText( float fNum, bool bAmplify ); static std::string BuildEnumString( std::vector& rStdList, std::string tag ); static std::string Get_A_BitSetText( unsigned int strID, double BisetID, double dValue, bool bAmplify ); static std::string Get_B_BitSetText( unsigned int strID, double BisetID, double dValue, bool bAmplify ); // 2010.05.14 - prodongi static std::string Get_C_BitSetText( unsigned int strID, double BisetID, double dValue, bool bAmplify ); std::string GetFirstStateBitSetText( struct StateInfoEx* pState, int strID, int pos, int nStateLevel, bool bAmplify ) const; std::string GetSecondStateBitSetText( StateInfoEx* pState, int strID, int pos, int nStateLevel, bool bAmplify ) const; // 2010.05.14 - prodongi std::string GetThirdStateBitSetText( StateInfoEx* pState, int strID, int pos, int nStateLevel, bool bAmplify ) const; std::string GetWeaponText( std::vector& rWeaponList ) const; // make basic state effect tooltip std::string BasicStateFxTooltip_PhysicalDamage( StateInfoEx* pState, int nStateLevel, const CreatureAttribute& userAttr, const CreatureAttribute& itemAttr ); // sonador 10.4.2 지속효과 기본공격 반영률 관련 오류 수정 std::string BasicStateFxTooltip_PhysicalDamageIgnoreDefense( StateInfoEx* pState, int nStateLevel, const CreatureAttribute& userAttr, const CreatureAttribute& itemAttr ); std::string BasicStateFxTooltip_MagicalDamage( StateInfoEx* pState, int nStateLevel, const CreatureAttribute& userAttr, const CreatureAttribute& itemAttr ); std::string BasicStateFxTooltip_MagicalDamageIgnoreDefense( StateInfoEx* pState, int nStateLevel, const CreatureAttribute& userAttr, const CreatureAttribute& itemAttr ); std::string BasicStateFxTooltip_HpRestoration( StateInfoEx* pState, int nStateLevel, const CreatureAttribute& userAttr, const CreatureAttribute& itemAttr ); std::string BasicStateFxTooltip_MpRestoration( StateInfoEx* pState, int nStateLevel, const CreatureAttribute& userAttr, const CreatureAttribute& itemAttr ); // make additional state effect tooltip std::string ParameterIncrease( StateInfoEx* pState, int nStateLevel ) const; std::string ParameterAmplify( StateInfoEx* pState, int nStateLevel ) const; std::string ParameterIncreaseEquipShild( StateInfoEx* pState, int nStateLevel ) const; // 2010.05.14 - prodongi std::string ParameterSync(StateInfoEx* pState, int nStateLevel) const; // 2010.05.17 - prodongi std::string AttackerAddState(StateInfoEx* pState, int nStateLevel) const; // 2010.08.11 - prodongi std::string MyAddState(StateInfoEx* pState, int nStateLevel) const; std::string DoubleAttack( StateInfoEx* pState, int nStateLevel ) const; std::string AttackAddDamege( StateInfoEx* pState, int nStateLevel ) const; std::string AttackAddDamegeRate( StateInfoEx* pState, int nStateLevel ) const; std::string MagicAddDemage( StateInfoEx* pState, int nStateLevel ) const; std::string MagicAddDemageRate( StateInfoEx* pState, int nStateLevel ) const; std::string AttackAddState( StateInfoEx* pState, int nStateLevel ) const; std::string AttackRecovery( StateInfoEx* pState, int nStateLevel ) const; std::string HpMpRecoveryWhenCritial( StateInfoEx* pState, int nStateLevel ) const; std::string AmplifySkillHealAmount( StateInfoEx* pState, int nStateLevel ) const; std::string AttackRecoveryRate( StateInfoEx* pState, int nStateLevel ) const; std::string AttackAbsorb( StateInfoEx* pState, int nStateLevel ) const; std::string BeAttackedReflection( StateInfoEx* pState, int nStateLevel ) const; std::string BeAttackedReflectionIgnoreDefense( StateInfoEx* pState, int nStateLevel ) const; std::string ReduceDamageAllType( StateInfoEx* pState, int nStateLevel ) const; std::string TransferDamageToMP( StateInfoEx* pState, int nStateLevel ) const; std::string RealtimeMainTenanceRecovery( StateInfoEx* pState, int nStateLevel ) const; std::string IncapacitateSate( StateInfoEx* pState, int nStateLevel ) const; std::string ImpossibleAction( StateInfoEx* pState, int nStateLevel ) const; std::string IncreaseHate( StateInfoEx* pState, int nStateLevel ) const; std::string IncreaseIntimidation( StateInfoEx* pState, int nStateLevel ) const; std::string InterruptSkill( StateInfoEx* pState, int nStateLevel ) const; std::string AddStateInRegion( StateInfoEx* pState, int nStateLevel ) const; std::string DecreaseMpConsumption( StateInfoEx* pState, int nStateLevel ) const; std::string Increase_Power_Cri_Ag_Cool( StateInfoEx* pState, int nStateLevel ) const; std::string SkillIncrease_Power_Cri_Ag_Cool( StateInfoEx* pState, int nStateLevel ) const; std::string AttackKnockBack( StateInfoEx* pState, int nStateLevel ) const; std::string AttackRangeType( StateInfoEx* pState, int nStateLevel ) const; std::string SelfRebirth( StateInfoEx* pState, int nStateLevel ) const; std::string DetectHiding( StateInfoEx* pState, int nStateLevel ) const; std::string RidingForSpeedUp( StateInfoEx* pState, int nStateLevel ) const; /// 2011.03.08 - prodongi std::string getStateToolTipInvulnerableness(StateInfoEx* pState) const; std::string getStateToolTipAddStateWhenKillTarget(StateInfoEx* pState, int nStateLevel, bool my) const; std::string getStateToolTipAddStateWhenType1(StateInfoEx* pState, int nStateLevel, int stringId, int attackTypeId, int personId) const; std::string getStateToolTipInfinitySummonRecall(StateInfoEx* pState) const; std::string getStateToolTipRangeTypeModifyDamage(StateInfoEx* pState, int nStateLevel) const; std::string getStateToolTipAttackedDecDamage(StateInfoEx* pState, int nStateLevel) const; std::string getStateToolTipAttackAmplifyAttDamage(StateInfoEx* pState, int nStateLevel) const; std::string getStateToolTipAttackedAddDamage(StateInfoEx* pState, int nStateLevel) const; std::string getStateToolTipAddStateDamage(StateInfoEx* pState, int nStateLevel) const; std::string getStateToolTipAmplifyStateDamage(StateInfoEx* pState, int nStateLevel) const; std::string getStateToolTipNotConsumptionEnergy(StateInfoEx* pState, int nStateLevel) const; std::string getStateToolTipAutoResurrection(StateInfoEx* pState, int nStateLevel) const; /// 2019.06.15 - Gangor std::string getStateTooltipBlessOfGoddess( StateInfoEx* pState, int nStateLevel ) const; /// 2011.04.05 - prodongi std::string getStateToolTipRecoveryHpMp(StateInfoEx* pState, int nStateLevel) const; std::string GetStateName( int StateID ); std::string GetSkillTreeToolTipText( const SkillTreeEx* pSkillTree, const bool bBaseLvCompare = false ); std::string GetItemColor( int nRank ); std::string getStateToolTipRecoveryHp(StateInfoEx* pState, int nStateLevel) const; /// 2011.04.26 - prodongi // 2010.07.23 - prodongi //std::string GetItemTooltipText( SInventorySlot* pItemSlot, bool bDetail ); //------------------------------------------------------------------------------------------------------------------------------------ // 아이템 툴팁 텍스트 얻기 : P.S ( // 1. Metin. 이 똥을 치우지 못한게 한이 맺힌다.ㅠㅠ, 2. lenahyang 역시 치우기에는 역부족... ) //------------------------------------------------------------------------------------------------------------------------------------ std::string GetItemTooltipText( SInventorySlot* pItemSlot, bool bDetail, AR_HANDLE creatureHandle = 0, bool isRClick = false ); std::string GetItemTooltipText( struct TS_ITEM_BASE_INFO* pItemBaseInfo, bool bDetail, bool bShop = false ); std::string GetItemTooltipText( int nItemID, bool bDetail, unsigned char byEnhance = 0, unsigned char byLevel = 1, XFlag xFlag = XFlag(), int nRemainTime = 0, int* pLevel = NULL, int Endurance = 0, AR_HANDLE hItemHandle = 0, int hasEquipped = 0, char elemental_effect_type = 0, int elemental_effect_remain_time = 0, int elemental_effect_attack_point = 0, int elemental_effect_magic_point = 0, bool bShop = false, int ethereal = -1, int soulpw = -1, AR_HANDLE creatureHandle = 0, int nSummonID = 0, bool isQuestRewardItem = false, bool isRClick = false, int nAppearanceItemID = 0, TS_ITEM_BASE_INFO::AwakenOption* const pAwakenOption = NULL, TS_ITEM_BASE_INFO::LPRANDOM_OPTION const pRandomOption = NULL, short nEnhance_chance = 0, int nAdditionalItemEffect = 0 // Fraun Sky Accessories 7/12/2025 ) const; void SetComparableEquipItemSubTooltip( KUIControl* pIcon, SInventorySlot* pItem ); void SetComparableEquipItemSubTooltip( KUIControl* pIcon, int nItemID ); //------------------------------------------------------------------------------------------------------------------------------------ void GetSoketTag( int nItemID, std::string& strTag ) const; void JewelTooltip( int nItemID, int* pLevel, std::string& strOptionVale, int Endurance, bool bShop, TS_ITEM_BASE_INFO::LPRANDOM_OPTION const pRandomOption ) const; std::string GetGenaralItemDetailTooltip( int nItemID, unsigned char byLevel, int byEnhance, bool bEnhanceint, int elemental_effect_attack_point, int elemental_effect_magic_point ) const; std::string GetGenaralItemEnhanceAbilityTooltip( int nItemID, unsigned char byLevel, int byEnhance, int nAbilityType, int elemental_effect_attack_point, int elemental_effect_magic_point ) const; bool IsJob( std::vector& JobList, int JobID ) const; void EraseJobList( std::vector& JobList, int Min, int Max ) const; void FillterJobList( std::vector& JobList ) const; std::string GetCardSkillTooltip( int nItemID, int nSkillID, bool bDetail, unsigned char byEnhance/* = 0*/, unsigned char byLevel/* = 1*/, XFlag xFlag/* = XFlag()*/ ) const; std::string GetEnhanceSkillTooltipText( int nItemID, int nSkillID, int nEnhance, bool bNext ) const; // std::string GetSkillTooltip( int nSkillID, int nUseLevel ); void GetMp( std::string& str , struct SkillBaseEx* s_data, int nUseLevel ); void GetHp( std::string& str , SkillBaseEx* s_data, int nUseLevel ); void GetCastTime( std::string& str , SkillBaseEx* s_data, int nUseLevel ); void GetAggro( std::string& str, std::string& strtype , SkillBaseEx* s_data, int nUseLevel ); void GetCritical( std::string& str, SkillBaseEx* s_data, int nUseLevel ); void GetDecreaseMpCard( std::string& str , SkillBaseEx* s_data, int nEnhance ); void GetDecreaseCastingCard( std::string& str , SkillBaseEx* s_data, int nEnhance, int nUseLevel ); void GetDecreaseCoolTimeCard( std::string& str , SkillBaseEx* s_data, int nEnhance ); void GetHitBonusCard( std::string& str , SkillBaseEx* s_data, int nEnhance ); void GetAddAggroCard( std::string& str , SkillBaseEx* s_data, int nEnhance ); int GetAbleUpMaxLevel( class SPlayerInfo& pPlayerInfo, int nSkillID, int nUseLevel ); void GetNextSkillMp( std::string& strMp, std::string& strEnhance, SkillBaseEx* s_data, int nUseLevel ); void GetNextSkillCasting( std::string& strCast, std::string& strEnhance, SkillBaseEx* s_data, int nUseLevel ); void GetNextSkillAggro( std::string& strAggro, std::string& strEnhance, SkillBaseEx* s_data, int nUseLevel ); void GetNextSkillCri( std::string& strCri, std::string& strEnhance, SkillBaseEx* s_data, int nUseLevel ); std::string GetSkillTooltipText( int nSkillID, int nUseLevle, bool bDetail, bool bNext = true, bool bUseCreatureAttribute = false ); std::string SkillEffectTooltipText( int nEffectType, int nSkillID, int nUseLevel, bool bNext, int nEnhance=0 ); std::string GetTimeString( float ar_Time, int cnt=1, bool bCut=false ) const; std::string GetCoolTimeString(float t) const; //2012. 1. 18 - marine std::string EnumSkillString( std::vector& vStrList, const char* pTag ); std::string SkillString( int nID, float OriData, bool bNext, float EnData, const char* pTag=NULL, const char* pKey="#@value@#", bool bPlus=true ); std::string BasePlusDataString( SkillBaseEx* s_data, int nID, int BaseIndex, int EnIndex, int nUseLevel, bool bNext, int nEnhance=0, const char* pTag=NULL, const char* pKey="#@value@#", bool bRate=false, bool bPlus=true ); std::string SkillValueString( SkillBaseEx* s_data, int nID, int BaseIndex, int EnIndex, int nUseLevel, bool bNext, int nEnhance=0, const char* pTag=NULL, const char* pKey="#@value@#", bool bRate=false, bool bPlus=true ); std::string MagicAttackTargetCount( SkillBaseEx* s_data, int nID, int BaseIndex, int EnIndex, int nUseLevel, bool bNext, int nEnhance=0, const char* pTag=NULL, const char* pKey="#@value@#", bool bRate=false, bool bPlus=true ); std::string MagicDemage( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string MagicAttackCount( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicUseCreatureHP( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicOneShotDead( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicAbsorptionHpMp( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicHpRateDamage( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicMPHpDamage( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicAttackRange( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicAttackTargetCount( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicDamageRate( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicDamageHeal( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string PhysicalHitDemage( struct SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string PhysicalHitAbsorb( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string PhysicalMultiHitDemage( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string PhysicalHitDemageRate( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string PhysicalRealHitDemageRate( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string MagicHitDemage( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string MagicHitDemageRate( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string MagicMultiHitDemage( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string SpecialMagicHitDemage( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string MagicRangeStatetDemage( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string Recovery( SkillBaseEx* s_data, int nUseLevel, RecoveryType type, bool bNext, int nEnhance=0 ); std::string RecoveryHPMP( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string RecoveryHPMP( SkillBaseEx* s_data, int nUseLevel, RecoveryType type, bool bNext, int nEnhance=0 ); std::string RecoveryHPMPSP( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string RecoveryRange( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string Absorption( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string AmountAbsorption( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string AmountAbsorptionRate( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string AddHitDemage( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string AttackCount( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string RealtimeAttackCount( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string AttackRange( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string MultiAttackRange( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string SpecialAttackRange( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string MultiAttackKnockBackRange( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string TargetCount( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string MultiAttackTargetCount( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string SpecialMultiAttackTargetCount( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string RangeMagicTargetCount( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string KnockBack( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string MultiAttackKnockBack( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string TamingRate( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string AddAggro( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance/*=0*/ ); std::string State( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string Resurrection( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string RemoveState( SkillBaseEx* s_data, int nUseLevel, bool bNext, int nEnhance=0 ); std::string GetAddStateName( struct SkillBaseEx* s_data ); const char* GetDragMaterialSound(); int GetMaterial( AR_HANDLE handle ); int GetMaterial_code( int nCode ); const char* GetMaterialSound( int nMaterial ); void GetAdditionalState( SkillBaseEx* s_data, std::string& rStateName ); bool CheckDamegeAggro( SkillBaseEx* s_data ); //캐쉬 창고 void RequestTakeOutCashItem( unsigned int ItemUID, count_t count ); // 창고 void RequestStorageItem( AR_HANDLE hItem, count_t nValue = count_t( 1 ), int nMode = 0 ); void ChangeStorageItem( AR_HANDLE hItem, bool bToStorage = true, count_t nItemCount = count_t(0) ); //servantes 2010.10.15 // 파티 void RequestJoinInvitedParty( bool bAccpet ); void RequestArenaOpponentJoinInvitedParty( bool accept ); void RequestArenaMemberJoinInvitedParty( bool accept ); void RequestJoinParty(bool accept, char const* token); void RequestJoinInvitedGuild( bool bAccpet ); void RequestDestroyParty( bool bAccept, bool bKick = false ); void RequestJoinRaidMercenaryInvite( bool bAccpet ); void RequestJoinRaidGuildInvite( bool bAccpet ); void SetPartyTarget( AR_HANDLE hTarget ); // 스킬 정보 ---------------------------------- /// 스킬 사용 void UseSkill( int nSkillID, int nLevel, bool bPlayer = true, AR_HANDLE hTarget = NULL ); bool UseSkillByToggle( int nSkillID, int nLevel, bool bPlayer = true, AR_HANDLE hTarget = NULL ); void DamageSysMsg( struct SMSG_DAMAGE* pDamage ); // 조작명령 void UseMotion( int nPos ); // 트레이드 void JoinTrade( bool bAccept ); void SetFreeze( bool bAccept ); // shop // 2010.07.14 - prodongi static money_t GetItemSellPrice( int nItemID, unsigned char byLevel, const bool ethereal_durability_exhausted = false ); //static money_t GetItemSellPrice( int nItemID, unsigned char byLevel ); // 인벤 bool IsStoreItem( AR_HANDLE hItem ); ItemBase::ItemWearType GetItemCurrentWearState( const AR_HANDLE hItem ) const; void UseOrEquipItem( AR_HANDLE hItem, AR_HANDLE hCreature = NULL, bool bSkillUnbind = false, bool bPosion = false ); // 사용/장착/장착해제 void DiscardItem( AR_HANDLE hItem, count_t nCount = count_t( 1 ) ); void UseNameChangeItem( AR_HANDLE hItem, AR_HANDLE hCreature, const char* lpText ); bool IsBlockedUsingItem(); // 2012. 2. 20 - marine enum { c_nEquipItemSetMaxCount = 5, ///< 장착 세트 최대 갯수 }; /// 클라이언트에서 장비세트 저장하지 않게 될 예정 .... 아직은 서버처리가 없음 ... int GetCurrentEquipSet( void ) const { return 0; } static bool IsEnhanceableItem( int itemID, const ItemBase* itemInfo ); // sonador 7.0.23 Mantis 0002812: [경매장] 불필요한 대장장이 Lv 표시 제거 요청 // sonador 7.0.28 카오스 스톤 Lv 표시 활성화 std::string GetItemName( AR_HANDLE handle ) const; std::string GetItemName( int nItemID, bool bSysMsg, unsigned char byEnhance = 0, unsigned char byLevel = 0, XFlag xFlag = XFlag(), bool bUseRank = false, AR_HANDLE hItemHandle = 0, bool isQuestRewardItem = false, TS_ITEM_BASE_INFO::LPRANDOM_OPTION const pRandomOption = NULL, int nAdditionalItemEffect = 0 ) const; // Fraun Sky Accessories 7/12/2025 /// 드랙앤드랍 SUIDragInfo* GetUIDragInfo() const { return m_pDragInfo; } /// NULL을 넣어주면 기존 정보가 제거된다. 반드시 drag시작된 UI윈도우에서 제거하도록 할 것. void SetUIDragInfo( SUIDragInfo* pDragInfo = NULL ) { SAFE_DELETE( m_pDragInfo ); m_pDragInfo = pDragInfo; } /// 벨트 슬롯 장착/해제 관련 // 2010.08.17 - prodongi //void ReqBeltItem( bool bPutOn, AR_HANDLE hItem ); void ReqBeltItem( bool bPutOn, AR_HANDLE hItem, int putSlot = 0 ); void ReqGuildIcon( int nGuild_id ); void RefectTrade(); bool IsPartyMember( AR_HANDLE hTarget ); void CuttingText( class KUIControlStatic* pNameText, const char* pName, std::string& rOutCutName, int nWidth, int nFontSize/*=10*/, const char* szFontName/*=NULL*/ ); bool IsCreatureBattleMode( AR_HANDLE hCreature ); void UseItemByText( SInventorySlot* pSlot ); void ChangeCreatureName(); void ChangePetName(); // 2010.08.06 - prodongi AR_HANDLE GetPartyHandle() { return m_hPartyHandle; } // 2010.08.19 아이템의 추가 성능 옵션 스트링만 갖고 온다, 다른 곳에 중복된 코드가 있는데,,나중에 정리를,, std::string getItemEffectTooltipText(ItemBaseEx_info const* itemBase, int ethereal); // 2010.08.20 장착 가능한 빈 벨트 슬롯을 찾는다- prodongi int findEmptyBeltSlot(AR_HANDLE handle); /// 2011.03.22 비트셋의 이름을 구한다 - prodongi std::string getStateToolTipBitSetAList(StateInfoEx* pState, int nStateLevel, int id, bool amplify) const; std::string getStateToolTipBitSetBList(StateInfoEx* pState, int nStateLevel, int id, bool amplify) const; /// 2011.09.28 퀘스트 난이도를 구한다, 0:easy, 1:normal, 2:hard - prodongi int getQuestDifficulty(int difficulty, int limitLevel); /// 2011.10.27 퀘스트 난이도 텍스트 칼라 - prodongi void getQuestDifficultyColor(int difficulty, int limitLevel, std::string& color); void getTitleEffectInfo( std::string& rTooltip, int nType, double fVar1, double fVar2 ) { BuildOptionTooltipValue(rTooltip,nType,fVar1,fVar2,0); } //static std::string BuildOptionTooltipValue( std::string& rTooltip, int nType, double fVar1, double fVar2, unsigned char byEnhance, int* pLevel = NULL ); rp::CAutoToolTip* GetAutoToolTip(); // ㅠㅠ private: class SGameManager* m_pGameManager; struct SUIDragInfo* m_pDragInfo; // sonador 10.4.1 스킬 툴팁 리뉴얼 rp::CSkillTooltip* m_pSkillTooltipComposer; rp::CSkillExSubject* m_pSkillSubject; rp::tag::TagPipe m_BattleMsgPipeLine; // sonador 1.10.3 전투 메시지 출력 처리 구조 개선 rp::CAutoToolTip* m_pAutoToolTip; // floyd 2009. 12. 22 DWORD m_dwCurTime; // process time __int64 m_nDiffExp; __int64 m_nDiffJP; money_t m_nOldGold; bool m_bControlPush; //servantes 2010.10.25 bool m_bAltPush; // AziaMafia Zentrix Alt /// 인벤 =============================== struct EQUIPITEM_SET { AR_HANDLE handles[ ItemBase::MAX_ITEM_WEAR ]; EQUIPITEM_SET() { ::ZeroMemory( handles, sizeof(handles) ); } void GetHandles( AR_HANDLE* pDesHandles ) { ::memcpy( pDesHandles, handles, sizeof(AR_HANDLE) * ItemBase::MAX_ITEM_WEAR ); } void SetHandles( const AR_HANDLE* pSrcHandles ) { ::memcpy( handles, pSrcHandles, sizeof(handles) ); } }; //QUICKSLOT_BTNSTATE m_CurrentButtonState; private: static string GetItemTooltipKeyword( int nType ); static string GetItemKeywordDetailTooltip( int nType );// const; static string GetItempBitsetAText( int strID, float fVar1, float fVar2, bool bAmplify, unsigned char byEnhance ); static string GetItempBitsetBText( int strID, float fVar1, float fVar2, bool bAmplify, unsigned char byEnhance ); static float BuildBaseTooltipValue( const ItemBaseEx_info * pItemBase, std::string& rTooltip, int nType, double fVar1, double fVar2, unsigned char byEnhance, unsigned char byLevel, int nPlayerLevel, int elemental_effect_attack_point, int elemental_effect_magic_point ); static string BuildOptionTooltipValue( std::string& rTooltip, int nType, double fVar1, double fVar2, unsigned char byEnhance, int* pLevel = NULL ); static void BuildEnhanceAddCapability( std::string& rTooltip, int nType, float fVar, unsigned char byEnhance ); void RefreshItemWeight( void ); int CheckEquippedItems( int setPartId, int setId ) const; static void ReplaceLimitLevelToolTip( string& strToolTip, const ItemBaseEx_info* pItemBase, const int nPlayerLevel ); static void ReplaceRecommandLevelToolTip( string& strToolTip, const ItemBaseEx_info* pItemBase, const BYTE byLevel ); static void ReplaceJopDepthToolTip( string& strToolTip, const ItemBaseEx_info* pItemBase, int nJobID ); static void ReplaceAwakenOptionToolTip( string& strToolTip, const ItemBaseEx_info* pItemBase, TS_ITEM_BASE_INFO::AwakenOption* const pAwakenOption, int ethereal, const bool bAwakeningItem, rp::CAutoToolTip* pAutoToolTip ); // Fraun Sky Accessories 7/12/2025 static void ReplaceAdditionalItemEffectOptionTooltip(string& strToolTip, const ItemBaseEx_info* pItemBase, int nAdditionalItemEffect, rp::CAutoToolTip* pAutoToolTip); // AziaMafia Fix RandomString static string GetItemRandomOptionString( const int nType, double fVar1, double fVar2 ); static void ReplaceRandomOptionTooltip( string& strToolTip, const ItemBaseEx_info* pItemBase, TS_ITEM_BASE_INFO::RANDOM_OPTION* const pRandomOption, int ethereal, const bool bIsRandomOptionItem, const bool bIsIdentifiedRandomOptionItem ); static void ReplaceEffectOptionTooltip( string& strTooltip, const ItemBaseEx_info* pItemBase, int nEffectID, int ethereal, bool add_tag ); ////////////////////////////////////////////////////////////////////////// // 아직 정리 되지 않은 소스코드 public: // 퀵슬롯 /////////////////////////////////////////////////// enum { c_nQuickSlotCount = 96 //c_nQuickSlotCtrCount = 24, }; bool IsEmptyQuickSlot( /*QUICKSLOT_BTNSTATE State, */int nSlotIndex ) const; // 2010.08.04 플레이어인지 크리쳐인지 체크- prodongi void ClearSkillQuickSlots(AR_HANDLE handle); // 2010.08.04 크리쳐 스킬을 퀵 슬롯에서 삭제- prodongi void ClearCreatureSkillQuickSlots(AR_HANDLE handle); void ClearSkillQuickSlots(); void ClearQuickSlotsAll(); //void SetCurrentButtonState( QUICKSLOT_BTNSTATE State ) { m_CurrentButtonState = State; } //void SetQuickSlot( QUICKSLOT_BTNSTATE State, int nSlotIndex, const SUIDragInfo* pDragInfo = NULL, AR_HANDLE hDelCreatureSlot = NULL ); void SetQuickSlot( int nSlotIndex, const SUIDragInfo* pDragInfo = NULL, AR_HANDLE hDelCreatureSlot = NULL ); void SetQuickSlotSkillLv(int nSkillID, int nSkillLv, bool bIsLvMax ); //void UseQuickSlot( QUICKSLOT_BTNSTATE State, int nSlotIndex ); void UseQuickSlot( int nSlotIndex ); ///////////////////////////////////// 빈 아이템 관련 데이터, 함수/////////////////////////////////////////////////////// enum{ QS_WAITING = 0, // 퀵슬롯 등록 대기 QS_REGISTERD = 1, // 퀵슬롯 등록 상태 QS_WAITING_TIME = 1000 // 퀵슬롯 대기 시간 ( 퀵슬롯을 사용하고 나서 인벤토리에서 유효성을 체크하는 시간.. 시간이 지나면 벡터에서 삭제 ) }; struct stEmptyItemSet { stEmptyItemSet() :iItem_Code(-1),iItem_State(-1),iSlotNum(-1){} stEmptyItemSet(int _code, int _state, int _slotnum ) { iItem_Code = _code ; iItem_State = _state; iSlotNum = _slotnum; dwTime = GetSafeTickCount();} int iItem_State; // 아이템 상태 int iSlotNum; // 슬롯 번호 int iItem_Code; // 아이템 고유 코드 DWORD dwTime; }; struct stUsedItem { stUsedItem():bRemainWaitingState(false){} ~stUsedItem(){ vEmptyItems.clear(); } std::vector vEmptyItems; // 등록 대기 아이템 벡터 bool bRemainWaitingState; // 이플레그가 true 일 때만 QuickslotEmptyItemProcess()함수를 호출한다.(성능향상을 위한 플래그) void pushEmptyItem( stEmptyItemSet itemSet ) { vEmptyItems.push_back(itemSet); setRemainWaiting(true); } int getEmptyItemSize() { return int(vEmptyItems.size()); } void ChangeSlotNum(int nBefore, int nNow); // 슬롯의 번호 변경 void SwapSlotNum(int nSlot1, int nSlot2); // 양슬롯이 빈거면 같이 스왑! bool IsEmptyItem(int iIndex); void eraseEmptyItem( int nIndex ); bool getReaminWaiting(){return bRemainWaitingState;} void setRemainWaiting(bool flag){ bRemainWaitingState = flag; } }; stUsedItem m_ExistEmptyItem; void QuickslotEmptyItemProcess(); // 빈아이템 관련 처리 const stEmptyItemSet GetEmptyItemSet( int nSlotCount ); // 빈아이템 정보 얻기 void ChageToOrigianlItem(AR_HANDLE handle); // 빈아이템->실제 아이템으로 변경 void SetChangSlotIndex(int slot1, int slot2); // 빈아이템간 슬롯 번호 변경 bool CheckIsChangeEmptyItem( SUIQuickSlotItemInfo*& pItemSlot, const int nSlotIndex ); // 퀵 슬롯에 등록되어 있는 아이템이 인벤에 존재 하지 않을 때, 빈 아이템인지 다른 아이템을 등록해야 하는지 판단 void EmptyItemCheckandDelete(int nSlotCount); // 빈아이템이 있다면 지운다.(빈아이템벡터에서만) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void SaveClientInfo(); void SaveQuickSlots(); void SaveKeymmapingInfo_current(); void SaveKeymappingInfo_saved(); //QUICKSLOT_BTNSTATE GetQuickSlotButtonState( bool bCS, bool bShiftDown, bool bControlDown, bool bAltDown ) const; //QUICKSLOT_BTNSTATE GetCurrentQuickSlotButtonState( bool bCS, bool bShiftDown, bool bControlDown, bool bAltDown ) const; //const QUICKSLOT_DISPLAYINFO* GetQuickSlotDisplayInfo( QUICKSLOT_BTNSTATE State, int nSlotIndex ) const; //bool GetQuickSlotClockInfo( QUICKSLOT_BTNSTATE State, int nSlotIndex, DWORD& rCurrentTime, DWORD& rMaxTime ) ; //const SUIQuickSlotInfo* GetQuickSlot( QUICKSLOT_BTNSTATE State, int nSlotIndex ) const; //bool CheckSkillInfo( QUICKSLOT_BTNSTATE State, int nSlotIndex, int nSkillID ); const QUICKSLOT_DISPLAYINFO* GetQuickSlotDisplayInfo( int nSlotIndex ) const; bool GetQuickSlotClockInfo( int nSlotIndex, DWORD& rCurrentTime, DWORD& rMaxTime ) ; const SUIQuickSlotInfo* GetQuickSlot( int nSlotIndex ) const; //bool CheckSkillInfo(AR_HANDLE caster, int nSlotIndex, int nSkillID ); SUIQuickSlotInfo* GetBackupedQuickSlot() { return m_pBackupedQuickSlot; }; ////////////////////////////////////////////////////////////////////////// // private func / attribute ////////////////////////////////////////////////////////////////////////// private: // Later, if a logoff or avatar change feature is added, don’t forget to initialize this to 0! // (Otherwise, it will keep saving even after logoff…) DWORD m_dwLastClientInfoSaveTime; // While this value is not 0, client info is saved periodically std::string m_strPreviousClientInfo; std::string m_strPreviousQuickSlotInfo; std::string m_strPreviousCurrentKeyInfo; std::string m_strPreviousSavedKeyInfo; int GetRightSkillLevel( int nSkillId, int nSkillLv ); void SaveActiveClientInfos(); void LoadClientInfo( const std::string& rInfoString ); void LoadQuickSlotInfo( const std::string& rInfoString ); void LoadCurrentKeyInfo( const std::string& rInfoString ); //gmpbigsun( 20130419 ) : 저장 키 맵핑 void LoadSavedKeyInfo( const std::string& rInfoString ); void SaveQuickSlotInfo( std::string& rSaveString ); void LoadQuickSlotUnit( const std::string& rQuickSlotInfoString ); void LoadQuickSlotUnitOld( const std::string& rQuickSlotInfoString ); // 2009년 3월 업데이트 이전 버전 호환을 위해서 존재합니다. 2009.03.24. sfreer //sfreer 키맵핑때문에 추가함.2009.03.17. void LoadKeymappingInfo( SGameWorldKeymapping &table, const std::string & rKeymappingInfoString ); void SaveKeymappingInfo( SGameWorldKeymapping &table, std::string & rSaveString, const char* szKeymappingHeader, const char* szEnterchatHeader ); private: // 퀵슬롯 /////////////////////////////////////////////////// //SUIQuickSlotInfo* m_pQuickSlots[ QUICKSLOT_BTN_MAXCOUNT ][ c_nQuickSlotCount ]; SUIQuickSlotInfo* m_pQuickSlots[ c_nQuickSlotCount ]; SUIQuickSlotInfo* m_pBackupedQuickSlot; ///< 마지막으로 지워진 퀵슬롯 : D&D했을 때 날아가는 퀵슬롯을 보존한다. void RefreshQuickSlot( /*QUICKSLOT_BTNSTATE State, */int nSlotIndex ); bool RefreshItemQuickSlotDisplayInfo( QUICKSLOT_DISPLAYINFO& rQuickSlotDispInfo, SInventorySlot* pSlot ); void RefreshSkillQuickSlotDisplayInfo( QUICKSLOT_DISPLAYINFO& rQuickSlotDispInfo, int nSkillID, int nSkillLevel, AR_HANDLE hCreature = NULL ); void RefreshMotionQuickSlotDisplayInfo( QUICKSLOT_DISPLAYINFO& rQuickSlotDispInfo, int nMotionID ); bool RefreshEmptyItemQuickSlotDisplayInfo( QUICKSLOT_DISPLAYINFO& rQuickSlotDispInfo, int nSlotCount ); void RefreshAllQuickSlots(); void RefreshItemQuickSlots(); void RefreshSkillQuickSlot( int nSkillID ); void RefreshMotionQuickSlot( int nMotionCmd ); void PostQuickSlotUpdateMsg(); // 퀵슬롯 백업 & 삭제 ------------------- /// 퀵슬롯을 m_pBackupedQuickSlot으로 옮기고 NULL을 세팅한다 void BackupAndDeleteQuickSlot( /*QUICKSLOT_BTNSTATE State, */int nSlotIndex ); SUIQuickSlotInfo* GetQuickSlotData( SUIQuickSlotInfo* pInfo ); AR_HANDLE m_hPartyHandle; ///< 파티 타겟팅 protected: class SRaidMgr& m_RaidMgr; class CPartyListMgr& m_PartyMgr; class SGuildMgr& m_GuildMgr; class SFriendMgr& m_FriendMgr; class SCutMgr& m_CutMgr; class STradeMgr& m_TradeMgr; class SStorageMgr& m_StorageMgr; class SMotionMgr& m_MotionMgr; class SPlayerInfoMgr& m_PlayerInfoMgr; class SInventoryMgr& m_InventoryMgr; class SCreatureSlotMgr& m_CreatureSlotMgr; class SSkillSlotMgr& m_SkillSlotMgr; class SCreatureSkillSlotMgr& m_CreatureSkillSlotMgr; class SGuildDataMgr& m_GuildDataMgr; class SPetMgr& m_PetMgr; };