#include "stdafx.h" #include "SkillEx.h" //#include "Util.h" #include #include #include "SStringDB.h" #include "SSkillDB.h" #include "STenacityDB.h" #include "SItemDB.h" #include #include "SkillBase.h" #include "SUIDisplayInfo.h" #include "SPlayerInfoMgr.h" #include "SSummonSlotMgr.h" #include namespace rp { CSkillEx::CSkillEx() : mSkill( 0 ), mUseLv( 0 ), mEnhance( 0 ), maxMP(0), curMP(0) { } CSkillEx::CSkillEx( SkillBaseEx* skill ) : mSkill( 0 ), mUseLv( 0 ), mEnhance( 0 ), maxMP(0), curMP(0) { bind( skill ); } void CSkillEx::bind( SkillBaseEx* skill ) { mSkill = skill; } bool CSkillEx::isRecoverable() const { int type = mSkill->GetEffectType(); if( type == SkillBase::EF_ADD_HP || type == SkillBase::EF_ADD_MP || type == SkillBase::EF_ADD_SP || type == SkillBase::EF_ADD_HP_MP || type == SkillBase::EF_ADD_HP_MP_BY_SUMMON_DAMAGE || type == SkillBase::EF_ADD_HP_MP_BY_SUMMON_DEAD || type == SkillBase::EF_CORPSE_ABSORB || type == SkillBase::EF_ADD_HP_MP_BY_STEAL_SUMMON_HP_MP ) return true; return false; } void CSkillExFxValue::update() { /// 2011.05.19 - prodongi //mValue = Subject->getSkill()->var[ m_FxValueIndex ]; if (Subject->isEnchantSkill()) { mValue = Subject->getSkill().level() * Subject->getSkill()->var[ m_FxValueIndex ] + Subject->getEnchantSkill()->var[m_FxValueIndex]; } else { mValue = Subject->getSkill()->var[ m_FxValueIndex ]; } } void CSkillExValueSkillLv::update() { if (Subject->isEnchantSkill()) { mValue = Subject->getEnchantSkill().level(); } else { mValue = Subject->getSkill().level(); } } void CSkillExValueEnhancePoint::update() { mValue = Subject->getSkill().enhance(); } void CSkillExValueUserAttack::update() { //const SPlayerInfo* playerInfo = Subject->getSkill().player(); //Value = playerInfo->GetAttribute().nAttackPointRight; mValue = Subject->getSkill().userAttribute().nAttackPointRight + Subject->getSkill().itemAttribute().nAttackPointRight; } void CSkillExValueUserMagic::update() { //const SPlayerInfo* playerInfo = Subject->getSkill().player(); //Value = playerInfo->GetAttribute().nMagicPoint; mValue = Subject->getSkill().userAttribute().nMagicPoint + Subject->getSkill().itemAttribute().nMagicPoint; } /// 2011.04.26 - prodongi void CSkillExValueCoolTime::update() { mValue = (float)Subject->getSkill()->GetCoolTime() / 100.0f; } void CSkillExSvValueConsumeBaseHP::update() { mValue = Subject->getSkill()->cost_hp; } void CSkillExSvValueConsumeSlvHP::update() { mValue = Subject->getSkill()->cost_hp_per_skl; } /// 2011.05.19 - prodongi void CSkillExValueMP::update() { mValue = Subject->getSkill()->cost_mp + Subject->getSkill().level() * Subject->getSkill()->cost_mp_per_skl; } /// 2011.05.19 - prodongi void CSkillExValueCastingDelay::update() { mValue = (float)(Subject->getSkill()->delay_cast + Subject->getSkill().level() * Subject->getSkill()->delay_cast_per_skl)/100.0f; } /// 2011.05.27 - prodongi void CSkillExValueMaxMP::update() { mValue = Subject->getSkill().getMaxMP(); } /// 2011.05.27 - prodongi void CSkillExValueCurMP::update() { mValue = Subject->getSkill().getCurMP(); } CSkillTooltip::~CSkillTooltip() { composer_map_t::iterator it = mComposerMap.begin(), end = mComposerMap.end(); for( ; it != end; ++it ) SAFE_DELETE( it->second ); mComposerMap.clear(); } CSkillTooltip* CSkillTooltip::append( const char* key, ISkillTooltipComposer* composer ) { mComposerMap.insert( std::make_pair( key, composer ) ); return this; } ISkillTooltipComposer* CSkillTooltip::find( const char* key ) { composer_map_t::iterator found = mComposerMap.find( key ); if( found != mComposerMap.end() ) { return found->second; } return 0; } void CSkillTooltip::compose( const CSkillEx& skill, std::string& tooltip ) { std::string pattern = "#@([_a-z]*)@#"; std::vector< std::string > matchList; while( nsl::regex::match( pattern.c_str(), tooltip.c_str(), &matchList ) ) { composer_map_t::iterator found = mComposerMap.find( matchList[ 0 ].c_str() ); if( found != mComposerMap.end() ) found->second->compose( skill, tooltip, found->first ); else CSkillEmptyDeco().compose( skill, tooltip, matchList[ 0 ] ); matchList.clear(); } } void CSkillEmptyDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { XStringUtil::Replace( tooltip, pattern.c_str(), "" ); } void CSkillLvDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { XStringUtil::Replace( tooltip, pattern.c_str(), CStringUtil::StringFormat( "%d", skill.level() ).c_str() ); } void CSkillAttributeIconDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { std::string attribute_icon; int elemental = skill->GetElementalType(); if( elemental == 0 ) attribute_icon = "#@NOMAL@#"; else if( elemental == 1 ) attribute_icon = "#@FIRE@#"; else if( elemental == 2 ) attribute_icon = "#@WATER@#"; else if( elemental == 3 ) attribute_icon = "#@WIND@#"; else if( elemental == 4 ) attribute_icon = "#@EARTH@#"; else if( elemental == 5 ) attribute_icon = "#@LIGHT@#"; else if( elemental == 6 ) attribute_icon = "#@DARK@#"; XStringUtil::Replace( tooltip, pattern.c_str(), attribute_icon.c_str() ); } void CSkillHpDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { XStringUtil::Replace( tooltip, pattern.c_str(), CStringUtil::StringFormat( "%d", skill->GetCostHP( skill.level() ) ).c_str() ); } void CSkillMpDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { XStringUtil::Replace( tooltip, pattern.c_str(), CStringUtil::StringFormat( "%d", skill->GetCostMP( skill.level() ) ).c_str() ); } void CSkillAggroDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { XStringUtil::Replace( tooltip, pattern.c_str(), CStringUtil::StringFormat( "%d", skill->GetHate( skill.level() ) ).c_str() ); } void CSkillAggroTypeDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { std::string aggroType; if( !skill->GetHate( skill.level() ) ) { if( skill.isRecoverable() ) aggroType = S( 7035 ); else aggroType = S( 7036 ); } XStringUtil::Replace( tooltip, pattern.c_str(), aggroType.c_str() ); } void CSkillCastingTimeDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { //시간을 시간, 분, 초로 나눠서 출력 std::string time; float ar_CastTime = skill->GetCastDelay( skill.level() ); if( ar_CastTime > 0 ) { time = " "; time += Helper->GetTimeString( ar_CastTime / 100.0f ).c_str(); } XStringUtil::Replace( tooltip, pattern.c_str(), time.c_str() ); } /// 2011.06.20 - prodongi void CSkillCoolTimeDeco::compose(const CSkillEx& skill, std::string& tooltip, const std::string& pattern) { // 2012. 1. 18 - marine 쿨타임이 소수점이하는 처리되지 않아서 수정 float cooltime = (float)(skill->GetCoolTime()) / 100.0f; float cooltimeSkl = (float)(skill->GetCoolTimePerSkill()) / 100.0f ; float t = cooltime + (float)skill.level() * cooltimeSkl; std::string str = S(77); str += " "; str += Helper->GetTimeString(t); XStringUtil::Replace(tooltip, pattern.c_str(), str.c_str()); } void CSkillCriticalBonusDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { int nCritical = skill->GetCriticalBonus( skill.level() ); if( nCritical ) XStringUtil::Replace( tooltip, pattern.c_str(), CStringUtil::StringFormat( "%d", nCritical ).c_str() ); else XStringUtil::Replace( tooltip, pattern.c_str(), "" ); } void CSkillEnhanceDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { XStringUtil::Replace( tooltip, pattern.c_str(), skill.enhance() > 0 ? CStringUtil::StringFormat( "+%d ", skill.enhance() ).c_str() : "" ); } void CSkillImproveMpCostDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { int improvedMpCost = skill->GetCostMPByEnhance( skill.enhance() ); XStringUtil::Replace( tooltip, pattern.c_str(), improvedMpCost ? CStringUtil::StringFormat( "(%d)", improvedMpCost ).c_str() : "" ); } void CSkillImproveCastingTimeDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { std::string improvedCastingTimeString; float castingTime = skill->GetCastDelay( skill.level() ); float improvedCastingTime = skill->GetCastDelayByEnhance( skill.enhance() ); if( improvedCastingTime ) improvedCastingTimeString = "(" + Helper->GetTimeString( castingTime / 100 * improvedCastingTime ) + ")"; XStringUtil::Replace( tooltip, pattern.c_str(), improvedCastingTimeString.c_str() ); } void CSkillImproveCoolTimeDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { std::string improvedCooltimeString; long coolTime( skill->GetCoolTime() ); /// 2011.04.27 AR_TIME -> long - prodongi float improvedCooltime( skill->GetCoolTimeByEnhance( skill.enhance() ) ); if( improvedCooltime ) improvedCooltimeString = "(" + Helper->GetTimeString( coolTime / 100 * improvedCooltime ) + ")"; XStringUtil::Replace( tooltip, pattern.c_str(), improvedCooltimeString.c_str() ); } void CSkillImproveHitBonusDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { int hitbonus( skill->GetHitBonusByEnhance( skill.enhance() ) ); XStringUtil::Replace( tooltip, pattern.c_str(), hitbonus ? CStringUtil::StringFormat( "(+%d)", hitbonus ).c_str() : "" ); } void CSkillImproveAggroDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { int aggro( skill->GetHateByEnhance( skill.enhance() ) ); XStringUtil::Replace( tooltip, pattern.c_str(), aggro ? CStringUtil::StringFormat( "(+%d)", aggro ).c_str() : "" ); } void CSkillFxDeco::setDefaultTag( const char* tag ) { m_DefaultTag = tag; } /// 2011.05.19 - prodongi void CSkillFxDeco::compileSkill(const CSkillEx& skill, std::string& result) { _STRING_TABLE_INFO* stringTable = GetStringDB().GetStringData( GameRule::SKILL_EFFECT_TOOLTIP_STRING_OFFSET + skill->GetSkillEffectType() ); if( stringTable ) { std::string fx = stringTable->pStrDesc; if( !fx.empty() ) { fx_expr::Compiler compiler( *m_Subject ); compiler.addTokens( "()+-*/&,$" ); compiler.addEscape( "'" ); compiler.compile( fx.begin(), fx.end() ); // 2010.08.31 에러 처리 - prodongi //result = compiler.result()->toString(); if (compiler.result()) result = compiler.result()->toString(); } } if( !result.empty() ) result = "
" + result; } // #2.1.2.12 void CSkillFxDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { /// 2011.05.19 - prodongi if (skill->skill_enchant_link_id) { std::string result, result1, result2; // 강화 스킬 m_Subject->setSkill( skill ); compileSkill(skill, result1); // 강화 대상 스킬 SkillBaseEx* enchantSkillData = GetSkillDB().GetSkillData(skill->skill_enchant_link_id); if (enchantSkillData) { rp::CSkillEx enchantSkill(enchantSkillData); enchantSkill.level(1); m_Subject->setSkill(skill, enchantSkill); compileSkill(enchantSkill, result2); } result = result1 + result2; nsl::replace( tooltip, pattern, result ); } else { m_Subject->setSkill( skill ); std::string result; compileSkill(skill, result); nsl::replace( tooltip, pattern, result ); } /* m_Subject->setSkill( skill ); std::string result; _STRING_TABLE_INFO* stringTable = GetStringDB().GetStringData( GameRule::SKILL_EFFECT_TOOLTIP_STRING_OFFSET + skill->GetSkillEffectType() ); if( stringTable ) { std::string fx = stringTable->pStrDesc; if( !fx.empty() ) { fx_expr::Compiler compiler( *m_Subject ); */ // compiler.addTokens( "()+-*/&,$" ); /* compiler.addEscape( "'" ); compiler.compile( fx.begin(), fx.end() ); // 2010.08.31 에러 처리 - prodongi //result = compiler.result()->toString(); if (compiler.result()) result = compiler.result()->toString(); } } if( !result.empty() ) result = "
" + result; nsl::replace( tooltip, pattern, result ); */ } const char* tagBR = "
"; const char* tagOBRACKET = "<#17f39c>("; const char* tagCBRACKET = ")<#ffffff>"; const char* tagFxEnhance = "<#17f39c>(#@value@#)<#ffeab1>"; void CSkillStateFxDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { std::string StateFxDeco; m_Subject->setSkill( skill ); // 2010.06.03 - prodongi std::vector stateLevel; std::vector< int > StateFxIDs; gatherStateFxIDFrom( skill, StateFxIDs, stateLevel ); //std::vector< int > StateFxIDs = gatherStateFxIDFrom( skill ); if( !StateFxIDs.empty() ) { std::string StateFxCommonDecl; int Probability = skill->GetStateSuccess( skill.level() ); AR_TIME Duration = skill->GetStateTime( skill.level() ); // 지속 시간 출력 if( !skill->IsToggle() && Duration ) { StateFxCommonDecl = S( 1606 ); // "#@success_per@#% 확률로 #@state_time@# 동안 #@state_name@# 효과 부여" std::string DurationString = m_Helper->GetTimeString( Duration / 100.0f ).c_str(); if( skill.enhance() ) { AR_TIME EnhancedDuration = skill->GetStateEnhanceTime( skill.enhance() ); if( EnhancedDuration ) { std::string EnhancedDurationString = S( 7001 ); XStringUtil::Replace( EnhancedDurationString, "#@enhance@#", m_Helper->GetTimeString( EnhancedDuration / 100.0f ).c_str() ); DurationString += EnhancedDurationString; } } XStringUtil::Replace( StateFxCommonDecl, "#@state_time@#", DurationString.c_str() ); } else StateFxCommonDecl = S( 2057 ); // "#@success_per@#% 확률로 #@state_name@# 효과 부여" // 부여 확률 출력 XStringUtil::Replace( StateFxCommonDecl, "#@success_per@#", SStringDB::ToString( Probability ).c_str() ); std::vector< int >::iterator it = StateFxIDs.begin(), end = StateFxIDs.end(); // 2010.06.03 - prodongi for(int count = 0 ; it != end; ++it, ++count ) //for( ; it != end; ++it ) { int StateFxID = *it; if( !isSystemStateFx( StateFxID ) ) // if the state fx is for system only, there's no need to show the state fx declaration. { int StateNameID = GetTenacityDB().GetNameID( StateFxID ); if( !StateNameID ) continue; std::string StateFxDecl( StateFxCommonDecl ); // 지속 효과명 XStringUtil::Replace( StateFxDecl, "#@state_name@#", GetStringDB().GetString( StateNameID ) ); StateFxDeco += tagBR; StateFxDeco += "<#FFC57F>"; StateFxDeco += StateFxDecl; StateFxDeco += "<#FFFFFF>"; } std::string StateFxDetail; // 2010.06.03 - prodongi int stateFxLevel = -1; if (count < (int)stateLevel.size()) stateFxLevel = stateLevel[count]; /// 2010.11.18 - prodongi getStateFxDetail( StateFxID, StateFxDetail, stateFxLevel, skill.enhance() ); //getStateFxDetail( StateFxID, StateFxDetail, stateFxLevel ); //getStateFxDetail( StateFxID, StateFxDetail ); if( !StateFxDetail.empty() ) { StateFxDeco += tagBR; StateFxDeco += StateFxDetail; } } } // 2010.06.03 - prodongi stateLevel.clear(); StateFxIDs.clear(); XStringUtil::Replace( tooltip, pattern.c_str(), StateFxDeco.c_str() ); } // 2010.05.17 - prodongi void CSkillPassiveFxDeco::compose( const CSkillEx& skill, std::string& tooltip, const std::string& pattern ) { std::string result; switch (skill->GetEffectType()) { case SkillBase::EF_PASSIVE_PARAMETER_INCREASE: result = parameterIncAmp(skill, false); break; case SkillBase::EF_PASSIVE_PARAMETER_AMPLIFY: result = parameterIncAmp(skill, true); break; } nsl::replace( tooltip, pattern, result ); } // 2010.05.17 - prodongi std::string CSkillPassiveFxDeco::getParameterTypeABitSetText(const CSkillEx& skill, int strId, int varPos, bool amplify) { if (0 == skill->var[varPos]) return ""; float p = (amplify) ? 100.0f : 1.0f; double dValue = (skill->var[varPos+1] + (float)skill.level() * skill->var[varPos+2]) * p; return SUIDisplayInfo::Get_A_BitSetText(strId, skill->var[varPos], dValue, amplify); } // 2010.05.20 - prodongi std::string CSkillPassiveFxDeco::getParameterTypeBBitSetText(const CSkillEx& skill, int strId, int varPos, bool amplify) { if (0 == skill->var[varPos]) return ""; float p = (amplify) ? 100.0f : 1.0f; double dValue = (skill->var[varPos+1] + (float)skill.level() * skill->var[varPos+2]) * p; return SUIDisplayInfo::Get_B_BitSetText(strId, skill->var[varPos], dValue, amplify); } // 2010.05.17 - prodongi std::string CSkillPassiveFxDeco::parameterIncAmp(const CSkillEx& skill, bool amplify) { std::string tooltip, strTemp; // 1 tooltip = getParameterTypeABitSetText(skill, 7153, 0, amplify); // 2 strTemp = getParameterTypeABitSetText(skill, 7153, 3, amplify); if( !strTemp.empty() ) { if( !tooltip.empty() ) tooltip += "
"; tooltip += strTemp; strTemp.clear(); } // 3 strTemp = getParameterTypeBBitSetText(skill, 7153, 6, amplify); if( !strTemp.empty() ) { if( !tooltip.empty() ) tooltip += "
"; tooltip += strTemp; strTemp.clear(); } // 4 strTemp = getParameterTypeBBitSetText(skill, 7153, 9, amplify); if( !strTemp.empty() ) { if( !tooltip.empty() ) tooltip += "
"; tooltip += strTemp; strTemp.clear(); } // 5 strTemp = getParameterTypeABitSetText(skill, 7153, 12, amplify); if( !strTemp.empty() ) { if( !tooltip.empty() ) tooltip += "
"; tooltip += strTemp; strTemp.clear(); } // 6 strTemp = getParameterTypeABitSetText(skill, 7153, 15, amplify); if( !strTemp.empty() ) { if( !tooltip.empty() ) tooltip += "
"; tooltip += strTemp; strTemp.clear(); } return tooltip; } bool CSkillStateFxDeco::isSystemStateFx( int stateFxID ) const { int SystemStateFxIDs[] = { 6502, 6503, 6504, 6505, 6506, 6507, 6508, 6509, 6510, 6511, 6512, 6513, 6515, 6516, 6517, 6518, 6519, 23492, }; int IDCount = sizeof( SystemStateFxIDs ) / sizeof( int ); for( int n = 0; n < IDCount; ++n ) if( SystemStateFxIDs[ n ] == stateFxID ) return true; return false; } // 2010.06.03 - prodongi // std::vector< int > CSkillStateFxDeco::gatherStateFxIDFrom( const CSkillEx& Skill ) void CSkillStateFxDeco::gatherStateFxIDFrom( const CSkillEx& Skill, std::vector& StateFxIDs, std::vector& stateLevel) { // 2010.06.03 - prodongi //std::vector< int > StateFxIDs; if( Skill->GetStateId() > 0 ) { StateFxIDs.push_back( Skill->GetStateId() ); } // TODO: gather stateIDs from skill fx db switch( Skill->GetEffectType() ) { case SkillBase::EF_ADD_STATE:// 301 case SkillBase::EF_ADD_STATE_REGION:// 302 case SkillBase::EF_ADD_STATE_WHEN_RACE_IS_FIT:// 307 case SkillBase::EF_RECALL_CREATURE_WITH_STATE:// 605 for( int i = 0; i < 5; ++i ) if( Skill->var[ i ] > 0 ) StateFxIDs.push_back( Skill->var[ i ] ); break; case SkillBase::EF_TOGGLE_AURA: for( int i = 3; i < 5; ++i ) if( Skill->var[ i ] > 0 ) StateFxIDs.push_back( Skill->var[ i ] ); break; case SkillBase::EF_TOGGLE_DISTRIBUTIVE_AURA: for( int i = 3; i < 8; ++i ) if( Skill->var[ i ] > 0 ) StateFxIDs.push_back( Skill->var[ i ] ); break; case SkillBase::EF_REMOVE_STATE_BY_GROUP: for( int i = 12; i < 15; ++i ) if( Skill->var[ i ] > 0 ) StateFxIDs.push_back( Skill->var[ i ] ); break; // 2010.05.12 - prodongi case SkillBase::EF_ADD_SEQ_STATE: if( Skill->var[ 10 ] > 0 ) StateFxIDs.push_back( Skill->var[ 10 ] ); // 2010.06.03 - prodongi case SkillBase::EF_ADD_STATE_WHEN_CASTING_CANCELED: if( Skill->var[ 4 ] > 0 ) StateFxIDs.push_back( Skill->var[ 4 ] ); break; case SkillBase::EF_ADD_STATE_308: if( Skill->var[ 0 ] > 0 ) StateFxIDs.push_back( Skill->var[ 0 ] ); if( Skill->var[ 1 ] > 0 ) StateFxIDs.push_back( Skill->var[ 1 ] ); if( Skill->var[ 2 ] > 0 ) StateFxIDs.push_back( Skill->var[ 2 ] ); break; case SkillBase::EF_ADD_STATE_309: if( Skill->var[ 0 ] > 0 ) StateFxIDs.push_back( Skill->var[ 0 ] ); break; /// 2011.04.13 - prodongi case SkillBase::EF_ADD_STATE_10048: case SkillBase::EF_ADD_STATE_10049: case SkillBase::EF_ADD_STATE_10050: case SkillBase::EF_ADD_STATE_10051: case SkillBase::EF_ADD_STATE_10052: case SkillBase::EF_ADD_STATE_10053: case SkillBase::EF_ADD_STATE_10054: case SkillBase::EF_ADD_STATE_10055: case SkillBase::EF_ADD_STATE_10056: case SkillBase::EF_ADD_STATE_10057: case SkillBase::EF_ADD_STATE_10058: case SkillBase::EF_ADD_STATE_10059: case SkillBase::EF_ADD_STATE_10060: case SkillBase::EF_ADD_STATE_10061: case SkillBase::EF_ADD_STATE_10062: if( Skill->var[ 0 ] > 0 ) StateFxIDs.push_back( Skill->var[ 0 ] ); break; /// 2011.05.03 - prodongi case SkillBase::EF_PHYSICAL_SINGLE_DAMAGE_AND_ADD_STATE: for( int i = 0; i < 10; ++i ) if( Skill->var[ i ] > 0 ) StateFxIDs.push_back( Skill->var[ i ] ); break; } // sonador 10.4.2 지속효과 기본공격 반영률 관련 오류 수정 // 추가효과 유형중 다른 지속효과를 참조하는 경우를 점검한다. int StateSize = StateFxIDs.size(); for( int index = 0; index < StateSize; ++index ) { StateInfoEx* StateInfo = GetTenacityDB().GetTenacityData( StateFxIDs.at( index ) ); if( StateInfo && StateInfo->effect_type == 88 && (int)StateInfo->fValue[ 0 ] > 0 ) StateFxIDs.push_back( (int)StateInfo->fValue[ 0 ] ); } // 2010.06.03 - prodongi int skillLevel = Skill.level(); float const* var = Skill->var; if( Skill->GetStateId() > 0 ) { stateLevel.push_back(-1); } switch( Skill->GetEffectType() ) { case SkillBase::EF_ADD_STATE_WHEN_CASTING_CANCELED: if( var[ 4 ] > 0 ) stateLevel.push_back(var[5]+skillLevel*var[6]); break; case SkillBase::EF_ADD_STATE_308: if( var[ 0 ] > 0 ) stateLevel.push_back(var[3]+skillLevel*var[4]); if( var[ 1 ] > 0 ) stateLevel.push_back(var[7]+skillLevel*var[8]); if( var[ 2 ] > 0 ) stateLevel.push_back(var[9]+skillLevel*var[10]); break; case SkillBase::EF_ADD_STATE_309: if( var[ 0 ] > 0 ) stateLevel.push_back(var[1]+skillLevel*var[2]); break; case SkillBase::EF_ADD_SEQ_STATE: if( var[ 10 ] > 0 ) stateLevel.push_back(var[11]+skillLevel*var[12]); break; } // 2010.06.03 - prodongi //return StateFxIDs; } // 2010.06.03 - prodongi /// 2010.11.18 - prodongi void CSkillStateFxDeco::getStateFxDetail( int StateFxID, std::string& StateFxDetail, int _stateFxLevel, int skillEnhance ) // void CSkillStateFxDeco::getStateFxDetail( int StateFxID, std::string& StateFxDetail ) { // 2010.06.03 - prodongi /// 2010.11.18 - prodongi int StateFxLevel; if (-1 == _stateFxLevel) { StateFxLevel = m_Subject->getSkill()->GetStateLevel( m_Subject->getSkill().level() ); StateFxLevel += m_Subject->getSkill()->GetStateEnhanceLv(skillEnhance); } else { StateFxLevel = _stateFxLevel; } //int StateFxLevel = m_Subject->getSkill()->GetStateLevel( m_Subject->getSkill().level() ); StateFxDetail += m_Helper->GetStateBaseEffectCaseToolTipText( StateFxID, StateFxLevel, m_Subject->getSkill().userAttribute(), m_Subject->getSkill().itemAttribute() ); // sonador 10.4.2 지속효과 기본공격 반영률 관련 오류 수정 // 2010.05.17 - prodongi std::string CaseDetail = m_Helper->GetStateCaseToolTipText( StateFxID, StateFxLevel, m_Subject->getSkill().level() ); // std::string CaseDetail = m_Helper->GetStateCaseToolTipText( StateFxID, StateFxLevel ); if( !CaseDetail.empty() && !StateFxDetail.empty() ) StateFxDetail += tagBR; StateFxDetail += CaseDetail; } } // namespace rp