Esempio n. 1
0
	void BalloonProcess( Tbl_MonsterSkill_Record _skill, Tbl_MonsterSkillLevel_Record _skillLv)
	{
		List<Tbl_SkillLevel_Potency> list = new List<Tbl_SkillLevel_Potency>();
		
		for(int i=0; i<_skill.listSkillPotency.Count; ++i)
		{
			Tbl_Skill_Potency potency = _skill.listSkillPotency[i];
			Tbl_SkillLevel_Potency lvPotency = _skillLv.listSkillLevelPotency[i];
			
			if(potency.Potency_Type == ePotency_Type.Balloon)
				list.Add( lvPotency);
		}
		
		if( list.Count > 0)
			m_Owner.HandleMessage( new Msg_BalloonIndicate( list[ Random.Range( 0, list.Count)]));
	}
Esempio n. 2
0
	public Msg_NpcAttackChar_Finish( Msg_NpcAttackChar1 _attack, Tbl_Action_Record _action, Tbl_MonsterSkillLevel_Record _skill)//, Msg_NpcMoveIndicate _move)
	{
		m_MessageType = eMessageType.NPC_ATTACK_FINISH;

		attack_ = _attack;
		action_ = _action;
		skill_ = _skill;
	}
Esempio n. 3
0
	public Msg_NpcAttackChar1( AS_SC_NPC_ATTACK_CHAR_1 _info)
	{
		m_MessageType = eMessageType.NPC_ATTACK_CHAR1;

		npcId_ = _info.nNpcIdx;

		sessionId_ = _info.nSessionIdx;
		charUniqKey_ = _info.nCharUniqKey;

		hpCur_ = _info.nHpCur;

		attacker_ = AsEntityManager.Instance.GetNpcEntityBySessionId( npcId_);
		skillLv_ = AsTableManager.Instance.GetTbl_MonsterSkillLevel_Record( _info.nMonsterSkillLevelTableIdx);
		skill_ = AsTableManager.Instance.GetTbl_MonsterSkill_Record( skillLv_.Skill_GroupIndex);
		action_ = AsTableManager.Instance.GetTbl_MonsterAction_Record( skillLv_.SkillAction_Index);

		casting_ = _info.bCasting;
		castingMilliSec_ = _info.nCastingMilliSec;
		ready_ = _info.bReady;

		if( true == casting_)
			Debug.Log( "true == casting_");

		foreach( AS_SC_NPC_ATTACK_CHAR_2 attack2 in _info.bodyChar)
		{
			bodyChar_.Add( new Msg_NpcAttackChar2( this, attack2));
		}

		foreach( AS_SC_NPC_ATTACK_CHAR_3 attack3 in _info.bodyNpc)
		{
			bodyNpc_.Add( new Msg_NpcAttackChar3( this, attack3));
		}
	}
Esempio n. 4
0
	public Msg_NpcAttackChar_Hit( Msg_NpcAttackChar1 _attack, Tbl_Action_Record _action, Tbl_MonsterSkillLevel_Record _skill)
	{
		m_MessageType = eMessageType.NPC_ATTACK_HIT;

		attack_ = _attack;
		action_ = _action;
		skill_ = _skill;
	}
	public override void LoadTable(string _path)
	{
		if( (null != AssetbundleManager.Instance && true == AssetbundleManager.Instance.useAssetbundle) || true == AsTableManager.Instance.useReadBinary )
		{
			TextAsset textAsset = ResourceLoad.LoadTextAsset( _path);
			MemoryStream stream = new MemoryStream( textAsset.bytes);
			BinaryReader br = new BinaryReader( stream);
			
			int nCount = br.ReadInt32();		
	
			for( int i = 0; i < nCount; i++)
			{
				Tbl_MonsterSkillLevel_Record record = new Tbl_MonsterSkillLevel_Record(br);
				m_ResourceTable.Add(record.Index, record);			
			}
			
			br.Close();
			stream.Close();
			
			foreach(KeyValuePair<int, Tbl_MonsterSkillLevel_Record> pair in m_ResourceTable)
			{
			
				if(m_ddicTable.ContainsKey(pair.Value.Skill_Level) == false)
					m_ddicTable.Add(pair.Value.Skill_Level, new Dictionary<int, Tbl_MonsterSkillLevel_Record>());
				
				if( false == m_ddicTable[pair.Value.Skill_Level].ContainsKey( pair.Value.Skill_GroupIndex))
					m_ddicTable[pair.Value.Skill_Level].Add(pair.Value.Skill_GroupIndex, pair.Value);
//				else
//					Debug.LogWarning("Tbl_MonsterSkillLevel_Table::LoadTable: same skill group index and skill level. [index:" +
//						pair.Value.Skill_GroupIndex + "][level:" + pair.Value.Skill_Level + "]");
			}
		}
		else
		{	

			try
			{
				XmlElement root = GetXmlRootElement(_path);
				XmlNodeList nodes = root.ChildNodes;
				
				foreach(XmlNode node in nodes)
				{
					Tbl_MonsterSkillLevel_Record record = new Tbl_MonsterSkillLevel_Record((XmlElement)node);
					m_ResourceTable.Add(record.Index, record);
				}
				
	//			List<Tbl_MonsterSkillLevel_Record> chargeableSkillLv = new List<Tbl_MonsterSkillLevel_Record>();
				foreach(KeyValuePair<int, Tbl_MonsterSkillLevel_Record> pair in m_ResourceTable)
				{
				
					if(m_ddicTable.ContainsKey(pair.Value.Skill_Level) == false)
						m_ddicTable.Add(pair.Value.Skill_Level, new Dictionary<int, Tbl_MonsterSkillLevel_Record>());
					
					if( false == m_ddicTable[pair.Value.Skill_Level].ContainsKey( pair.Value.Skill_GroupIndex))
						m_ddicTable[pair.Value.Skill_Level].Add(pair.Value.Skill_GroupIndex, pair.Value);
				}
			}
			catch(System.Exception e)
			{
				Debug.LogError("[Tbl_MonsterSkillLevel_Table] LoadTable:|" + e + "| error while parsing ");
			}
		}
	}