#include "stdafx.h" #include "InstantSkill.h" //================================================================================================== #include #include #include #include "AITypes.h" #include "CharacterFormula.h" #include "GameField.h" #include "Character.h" #include "Player.h" #include "NPC.h" //================================================================================================== // @history // - ~110308 // - 110308, waverix, code arrangement void InstantSkill::SetExecuteInterval() { interval_ = 0; // const eSKILL skill_class_code = GetSkillClassCode(); switch (skill_class_code) { case eSKILL_DOUBLE_ATTACK: interval_ = 2000; break; case eSKILL_ILLUSION_DANCE: interval_ = 1500; break; case eSKILL_BLOOD_RAIN: interval_ = 2000; break; case eSKILL_AIRBLOW: interval_ = 4000; break; case eSKILL_BATTLERHONE: interval_ = 4000; break; }; } bool InstantSkill::FindTargets( ns_object::SearchOption::SingleSearch::result_type* const result) { //_NA000000_110210_ENHANCED_TARGET_SEARCH_ALGORITHM __UNUSED(result); assert(!"can't entered at this point"); return false; } BOOL InstantSkill::StartExecute() { // TODO: WARNING: if the result of method processing is fails, // may be skip Skill::EndExecute() calling game_field_ = owner_->GetField(); if (game_field_ == NULL) { MSG_CG_SKILL_ACTION_NAK msg_nak; msg_nak.m_byErrorCode = RC::RC_SKILL_FIELD_IS_NULL; owner_->SendPacket(&msg_nak, sizeof(msg_nak)); SUNLOG(eCRITICAL_LOG, _T("|["__FUNCTION__"]|ÐÅÏ¢=GameField is NULL!")); return false; } //---------------------------------------------------------------------------------------------- Skill::InitResultMsg(); //---------------------------------------------------------------------------------------------- // test whether the main target is valid like a skill attack ranges checking. if (CheckMainTarget(NULL) == false) { // ½ºÅ³ÀÌ ¹«È¿È­µÇÁö ¾Ê°í Miss 󸮵ǹǷΠMP¸¦ °¨¼Ò½ÃŲ´Ù. DecreaseHPMP(); // Miss 󸮸¦ Çϱâ À§Çؼ­ °á°ú ÆÐŶÀº º¸³½´Ù. Broadcast_Instant_Result(); return false; } // MP¸¦ °¨¼Ò½ÃŲ´Ù. DecreaseHPMP(); //_NA000000_110210_ENHANCED_TARGET_SEARCH_ALGORITHM Skill::ExecuteSkill(); // Broadcast_Instant_Result(); // NOTE: the instant skill has not Skill::EndExecute() calling... why? return true; }