public AsSlot.SLOT_TYPE GetSlotType( eSKILL_TYPE eSkillType) { switch( eSkillType) { case eSKILL_TYPE.Charge: case eSKILL_TYPE.TargetCharge: return AsSlot.SLOT_TYPE.SLT_IT_CHARGE; case eSKILL_TYPE.Target: case eSKILL_TYPE.SlotBase: return AsSlot.SLOT_TYPE.SLT_IT_TARGET; } return AsSlot.SLOT_TYPE.SLT_IT_IMMEDIATE; }
// bad code public Tbl_Skill_Record GetSkillByType(eCLASS _class, eSKILL_TYPE _type, eCommand_Type _commandType) { if(_commandType == eCommand_Type.DoubleTab) { Debug.LogWarning("Tbl_Skill_Table::GetSkillByType: invalid usage eCommand_Type.DoubleTab. " + "DoubleTab skills does not exist alone, So use [GetDoubleTabSkillByPickingType()] function"); return null; } foreach(Tbl_Skill_Record record in m_ClassTypeTable[_class]) { if(record.Skill_Type == _type) { if(_commandType == eCommand_Type.NONE) return record; else if(_commandType == record.Command_Type) return record; } } Debug.LogWarning( "[Tbl_Skill_Table]GetSkillByType: there is no record. class=" + _class + ", type = " + _type + ", command type = " + _commandType); return null; }
public Tbl_Skill_Record(BinaryReader br)// : base(_element) { m_Index = br.ReadInt32(); m_SkillName_Index = br.ReadInt32(); m_Description_Index = br.ReadInt32(); m_SkillName_Print = (eSkillNamePrint)br.ReadInt32(); m_SkillReset = (eSkillReset)br.ReadInt32(); m_nSkillResetCost = br.ReadInt32(); m_SkillAutoTarget = (eSkillAutoTarget)br.ReadInt32(); m_Skill_Icon = br.ReadString(); m_Class = (eCLASS)br.ReadInt32(); m_Skill_Type = (eSKILL_TYPE)br.ReadInt32(); m_Skill_TargetType = (eSkill_TargetType)br.ReadInt32(); m_SkillIcon_Enable_Target = (eSkillIcon_Enable_Target)br.ReadInt32(); m_SkillIcon_Enable_Condition = (eSkillIcon_Enable_Condition)br.ReadInt32(); m_SkillIcon_Enable_ConditionValue = br.ReadInt32(); m_Command_Type = (eCommand_Type)br.ReadInt32(); m_CommandPicking_Type = (eCommandPicking_Type)br.ReadInt32(); m_Attack_Direction = (eATTACK_DIRECTION)br.ReadInt32(); m_CoolTimeGroup = br.ReadInt32(); m_DisableInPvP = (eDisableInPvP)br.ReadInt32(); m_DisableInRaid = (eDisableInRaid)br.ReadInt32(); m_DisableInField = (eDisableInRaid)br.ReadInt32(); m_DisableInInDun = (eDisableInInDun)br.ReadInt32(); for(int i=1; i<=AsTableManager.sSkillLevelPotencyCount; ++i) { ePotency_Enable_Target check_target = (ePotency_Enable_Target)br.ReadInt32(); ePotency_Enable_Condition check_condition = (ePotency_Enable_Condition)br.ReadInt32(); float check_conditionValue = br.ReadSingle(); ePotency_Enable_Target check_target2 = (ePotency_Enable_Target)br.ReadInt32(); ePotency_Enable_Condition check_condition2 = (ePotency_Enable_Condition)br.ReadInt32(); float check_conditionValue2 = br.ReadSingle(); ePotency_Type type = (ePotency_Type)br.ReadInt32(); ePotency_Target target = (ePotency_Target)br.ReadInt32(); ePotency_DurationType duration = (ePotency_DurationType)br.ReadInt32(); ePotency_Attribute attribute = (ePotency_Attribute)br.ReadInt32(); ePotency_Element element = ePotency_Element.NONE; string buff = br.ReadString(); int buffToolTipIdx = br.ReadInt32(); Tbl_Skill_Potency potency = new Tbl_Skill_Potency(check_target, check_condition, check_conditionValue, check_target2, check_condition2, check_conditionValue2, type, target, duration, attribute, element, buff, buffToolTipIdx); m_listSkillPotency.Add(potency); } }
public Tbl_Skill_Record GetTbl_Skill_Record( eCLASS _class, eSKILL_TYPE _type, eCommand_Type _inputType) { return m_Tbl_Skill.GetSkillByType( _class, _type, _inputType); }
//constructor public Msg_Player_Skill_Ready( eCLASS _class, eSKILL_TYPE _type, eCommand_Type _command, eGENDER _gender, AsBaseEntity _pickedEntity, Vector3 _picked, Vector3 _head, Vector3 _center, Vector3 _tail, Vector3 _dir, eClockWise _cw) { m_MessageType = eMessageType.PLAYER_SKILL_READY; pickedEntity_ = _pickedEntity; picked_ = _picked; head_ = _head; center_ = _center; tail_ = _tail; direction_ = _dir; cw_ = _cw; switch( _type) { case eSKILL_TYPE.Base: skillRecord_ = AsTableManager.Instance.GetRandomBaseSkill( _class); break; case eSKILL_TYPE.Command: skillRecord_ = SkillBook.Instance.GetLearnedCommandSkill( _command); break; default: Debug.LogError( "Msg_Player_Skill_Ready::Msg_Player_Skill_Ready(): [class]" + _class + ",[type]" + _type + ",[command]" + _command + ",[head_]" + _head + ",[center_]" + _center + ",[tail_]" + _tail + ",[direction]" + direction_); break; } if( skillRecord_ != null) { skillLv_ = SkillBook.Instance.GetSkillLevel( skillRecord_); skillLvRecord_ = AsTableManager.Instance.GetTbl_SkillLevel_Record( skillLv_, skillRecord_.Index); int actionIdx = -1; if( _gender == eGENDER.eGENDER_MALE) { if( cw_ == eClockWise.CW) actionIdx = skillLvRecord_.SkillAction_Index; else actionIdx = skillLvRecord_.SkillActionCCW_Index; } else if( _gender == eGENDER.eGENDER_FEMALE) { if( cw_ == eClockWise.CW) actionIdx = skillLvRecord_.SkillAction_Index_Female; else actionIdx = skillLvRecord_.SkillActionCCW_Index_Female; } actionRecord_ = AsTableManager.Instance.GetTbl_Action_Record( actionIdx); if( skillLvRecord_ != null || actionRecord_ != null) { constructSucceed_ = true; return; } } }
public Tbl_MonsterSkill_Record(BinaryReader br) { m_Index = br.ReadInt32(); m_Des_SkillName = br.ReadString(); m_SkillName_Index = br.ReadInt32(); int print = 0; print = br.ReadInt32(); switch(print) { case 0: m_SkillName_Print = eSkillNamePrint.None; break; case 1: m_SkillName_Print = eSkillNamePrint.Print; break; case 2: m_SkillName_Print = eSkillNamePrint.Negative; break; } m_Class = br.ReadString(); m_Skill_Type = (eSKILL_TYPE)br.ReadInt32(); int icount = br.ReadInt32(); for(int i=0; i<icount; ++i) { ePotency_Enable_Target check_target = (ePotency_Enable_Target)br.ReadInt32(); ePotency_Enable_Condition check_condition = (ePotency_Enable_Condition)br.ReadInt32(); float check_conditionValue = br.ReadSingle(); ePotency_Enable_Target check_target2 = (ePotency_Enable_Target)br.ReadInt32(); ePotency_Enable_Condition check_condition2 = (ePotency_Enable_Condition)br.ReadInt32(); float check_conditionValue2 = br.ReadSingle(); ePotency_Type type = (ePotency_Type)br.ReadInt32(); ePotency_Target target = (ePotency_Target)br.ReadInt32(); ePotency_DurationType duration = (ePotency_DurationType)br.ReadInt32(); ePotency_Attribute attribute = (ePotency_Attribute)br.ReadInt32(); string buff = br.ReadString(); int iBuffTooltipIdx = br.ReadInt32(); Tbl_Skill_Potency potency = new Tbl_Skill_Potency(check_target, check_condition, check_conditionValue, check_target2, check_condition2, check_conditionValue2, type, target, duration, attribute, ePotency_Element.NONE, buff, iBuffTooltipIdx); m_listSkillPotency.Add(potency); } }