Пример #1
0
	public void Init( AsUserEntity _user)
	{
		m_UserEntity = _user;
		m_UserName = _user.GetProperty<string>( eComponentProperty.NAME);
		eCLASS usrClass = _user.GetProperty<eCLASS>( eComponentProperty.CLASS);
		int usrLevel = _user.GetProperty<int>( eComponentProperty.LEVEL);
//		consumeMiracle.Text = AsTableManager.Instance.GetTbl_Level_Record( usrClass, usrLevel).Resurrection_Cost.ToString();
		consumeMiracle.Text = AsTableManager.Instance.GetTbl_GlobalWeight_Record("Revival_Miracle_Help").Value.ToString();
	}
Пример #2
0
	bool SetPlayerInfo(Def_Promotion.eCondition _condition)
	{
		m_Player = AsUserInfo.Instance.GetCurrentUserEntity();
		
		if(m_Player != null)
		{
			Tbl_Promotion_Table promotionTable = AsTableManager.Instance.GetTbl_PromotionTable();
			
			eCLASS __class = m_Player.GetProperty<eCLASS>(eComponentProperty.CLASS);
			
			if(promotionTable != null)
			{
				MultiDictionary<Def_Promotion.eCondition, Tbl_Promotion_Record> mdicRecords = promotionTable.GetRecordsByClass(__class);
				if(mdicRecords != null)
				{
					List<Tbl_Promotion_Record> listRecord = mdicRecords[_condition];
					
					if(listRecord.Count == 0)
					{
						Debug.LogWarning("AsPromotionManager::SetPlayerInfo: no conditioned record. check promotion table. __class = " + __class);
						return false;
					}
					
					m_Record = null;
					foreach(Tbl_Promotion_Record node in listRecord)
					{
						if(node.CheckValidLevel(m_Player.GetProperty<int>(eComponentProperty.LEVEL)) == true)
						{
							if(m_Record == null || node.Priority < m_Record.Priority )
								m_Record = node;
						}
					}
					
					if(m_Record != null)
						return true;
					else
						return false;
				}
				else
				{
					Debug.LogWarning("AsPromotionManager::SetPlayerInfo: no classified records. __class = " + __class);
					return false;
				}
			}
			else
			{
				Debug.LogError("AsPromotionManager::SetPlayerInfo: promotionTable is null. AsGameMain.s_gameState = " + AsGameMain.s_gameState);
				return false;
			}
		}
		else
		{
			Debug.LogError("AsPromotionManager::SetPlayerInfo: player entity is null. AsGameMain.s_gameState = " + AsGameMain.s_gameState);
			return false;
		}
	}
Пример #3
0
	public void SetData( AsUserEntity data, bool isLocked)
	{
		// < ilmeda 20120814
		AsLanguageManager.Instance.SetFontFromSystemLanguage( level);
		AsLanguageManager.Instance.SetFontFromSystemLanguage( nameLabel);
		// ilmeda 20120814 >

		txtLocked.gameObject.SetActiveRecursively( false);
		locked.gameObject.SetActiveRecursively( isLocked);

		if( null == data)
		{
			empty.gameObject.SetActiveRecursively( false);
			level.gameObject.SetActiveRecursively( false);
			nameLabel.gameObject.SetActiveRecursively( false);
			emptySlot.gameObject.SetActiveRecursively( true);
		}
		else
		{
			bool isEmpty = data.ContainProperty( eComponentProperty.EMPTY_SLOT);
			
			if( true == isEmpty)
			{
				if( AsCharacterSlotManager.PossibleCharCreate == true)
				{
					empty.gameObject.SetActiveRecursively( true);
					txtLocked.gameObject.SetActiveRecursively( false);
				}
				else
				{
					Debug.Log( "empty.gameObject.SetActiveRecursively( false)_2");
					empty.gameObject.SetActiveRecursively( false);
					txtLocked.gameObject.SetActiveRecursively( true);
					txtLocked.Text = AsTableManager.Instance.GetTbl_String(1531);
				}

				level.gameObject.SetActiveRecursively( false);
				nameLabel.gameObject.SetActiveRecursively( false);
				emptySlot.gameObject.SetActiveRecursively( true);
			}
			else
			{
				Debug.Log( "empty.gameObject.SetActiveRecursively( false)_3");
				empty.gameObject.SetActiveRecursively( false);
				level.gameObject.SetActiveRecursively( true);
				nameLabel.gameObject.SetActiveRecursively( true);
				emptySlot.gameObject.SetActiveRecursively( false);

				level.Text = string.Format( "Lv.{0}", data.GetProperty<int>( eComponentProperty.LEVEL));
				nameLabel.Text = data.GetProperty<string>( eComponentProperty.NAME);
			}
		}
	}
Пример #4
0
    public static bool IsPossibleAccept(AsUserEntity _user, QuestData _questData, int _addLevel)
    {
        if (_questData.Condition.CanAccept() == false)
            return false;

        // 레벨 확인
        List<ConditionLevel> listConditionLevel = _questData.Condition.GetCondition<ConditionLevel>();
        ConditionLevel levelConditon = new ConditionLevel();
        if (listConditionLevel.Count > 0)
        {
            int level = _user.GetProperty<int>(eComponentProperty.LEVEL) + _addLevel;
            levelConditon.CommonValue = level;

            if (!listConditionLevel[0].CheckAccept(levelConditon))
                return false;
        }

        // 퀘스트 패스 확인  or
        bool bAcceptAnd = true;
        bool bAcceptOr  = false; 
        int  nOrCount   = 0;
        List<ConditionQuestPass> listQuestPass = _questData.Condition.GetCondition<ConditionQuestPass>();

        if (listQuestPass.Count > 0)
        {
            foreach (ConditionQuestPass questPass in listQuestPass)
            {
                if (questPass.QuestPassType == QuestPassType.AND)
                    bAcceptAnd &= ArkQuestmanager.instance.IsCompleteQuest(questPass.QuestID);
                else
                {
                    bAcceptOr |= ArkQuestmanager.instance.IsCompleteQuest(questPass.QuestID);
                    nOrCount++;
                }
            }

            if (nOrCount > 0)
            {
                if (bAcceptAnd == false)
                    return false;

                if (bAcceptOr == false)
                    return false;
            }
            else
            {
                if (bAcceptAnd == false)
                    return false;
            }
        }

        return true;
    }
Пример #5
0
	// hp, mp
	public void ShowNumberPanel(AsUserEntity userEntity, int nValue, eATTRCHANGECONTENTS eContents, eCustomFontType eType, eDAMAGETYPE eDamageType)
	{
		if( null == userEntity)
			return;
		
		if( eATTRCHANGECONTENTS.eATTRCHANGECONTENTS_USING_SKILL == eContents
			|| eATTRCHANGECONTENTS.eATTRCHANGECONTENTS_KILLNPC == eContents)
		{
			if( nValue <= 0)
				return;
			
			int nRes = nValue;
			float fSpeed = 1.0f;
			float fScale = 1.2f;
			
			if( eCustomFontType.eCustomFontType_HP == eType)
			{
				float maxHP = userEntity.GetProperty<float>( eComponentProperty.HP_MAX);
				float curHP = userEntity.GetProperty<float>( eComponentProperty.HP_CUR);
				float subHP = maxHP - curHP;
				if( subHP < nValue)
					nRes = (int)subHP;
				fSpeed = m_fSpeed_Damage_HP;
				fScale = m_fScale_Damage_HP;
			}
			else if( eCustomFontType.eCustomFontType_MP == eType)
			{
				float maxMP = userEntity.GetProperty<float>( eComponentProperty.MP_MAX);
				float curMP = userEntity.GetProperty<float>( eComponentProperty.MP_CUR);
				float subMP = maxMP - curMP;
				if( subMP < nValue)
					nRes = (int)subMP;
				fSpeed = m_fSpeed_Damage_MP;
				fScale = m_fScale_Damage_MP;
			}
			
			if( nRes >= 0)
			{
				if( eDAMAGETYPE.eDAMAGETYPE_CRITICAL == eDamageType)
					_ShowNumberPanel( userEntity.transform.gameObject, "!", 2, true, true, m_fSpeed_Damage_Critical, m_fScale_Damage_Critical); // critical user
				
				string str = _GetCustomFont( nRes, eType);
				_ShowNumberPanel( userEntity.transform.gameObject, str, 0, false, false, fSpeed, fScale); // HP, MP user
			}
		}
		else if( eATTRCHANGECONTENTS.eATTRCHANGECONTENTS_DOT_DAMAGE == eContents)
		{
//			if( nValue <= 0)
//				return;
//
//			float maxHP = userEntity.GetProperty<float>( eComponentProperty.HP_MAX);
//			float curHP = userEntity.GetProperty<float>( eComponentProperty.HP_CUR);
//			float subHP = maxHP - curHP;
//			int nRes = nValue;
//			if( subHP < nValue)
//				nRes = (int)subHP;
//			
//			if( nRes > 0)
//			{
//				string str = _GetCustomFont( nRes, eType);
//				_ShowNumberPanel( userEntity.transform.gameObject, str, 0, false, false, m_fSpeed_Damage_DotHeal, m_fScale_Damage_DotHeal); // Dot Healling user
//			}
			
			string str = "";
			int nRes = nValue;
			
			if( nValue <= 0)
			{
				nRes *= -1;
				//str = nRes.ToString(); // dot damage
				str = _GetCustomFont( nRes, eCustomFontType.eCustomFontType_AllyDamage);
			}
			else
				str = _GetCustomFont( nRes, eType); // dot healling
			
			_ShowNumberPanel( userEntity.transform.gameObject, str, 0, false, false, m_fSpeed_Damage_DotHeal, m_fScale_Damage_DotHeal); // Dot Healling user
		}
		else if( eATTRCHANGECONTENTS.eATTRCHANGECONTENTS_HP_INSTEAD_MP == eContents)
		{
			int nRes = nValue;
			if( nValue <= 0)
				nRes *= -1;
			
			if( eDAMAGETYPE.eDAMAGETYPE_CRITICAL == eDamageType)
				_ShowNumberPanel( userEntity.transform.gameObject, "!", 2, true, true, m_fSpeed_Damage_Critical, m_fScale_Damage_Critical); // critical user
			
			_ShowNumberPanel( userEntity.transform.gameObject, nRes.ToString(), 0, true, false, m_fSpeed_Damage, m_fScale_Damage); // damage(red font)
		}
	}
Пример #6
0
	void InitialParts( AsUserEntity entity)
	{
		startedTime = Time.realtimeSinceStartup;
		Debug.Log( "AsModel::InitialParts: begin time checking");
		
		if( null == entity)
		{
			Debug.LogError( "AsModel::InitalParts() [ null == entity ]");
			return;
		}
		
		if( null == entity.getCharView || null == entity.getCosItemView)
		{
			Debug.LogError( "AsModel::InitalParts() [ null == entity.getCharView || null == entity.getCosItemView ]");
			return;
		}
		
		if( AsGameDefine.ITEM_SLOT_VIEW_COUNT != entity.getCharView.Length || AsGameDefine.ITEM_SLOT_COS_VIEW_COUNT != entity.getCosItemView.Length) 
		{
			Debug.LogError( "AsModel::InitialParts() [ !( AsGameDefine.ITEM_SLOT_VIEW_COUNT == _partsData.Length) ] length : " + entity.getCharView.Length);
			return;
		}

		eCLASS __class = entity.GetProperty<eCLASS>( eComponentProperty.CLASS);
		string strBasePath = GetBaseBonPath();
		
		if( true == m_PartsRoot.Create( strBasePath, entity.GetProperty<eGENDER>( eComponentProperty.GENDER), __class, entity.UniqueId))
		{
			Entity.SetModelObject( m_PartsRoot.getBone);
			Debug.Log( "AsModel::InitialParts: begin init character, weapon dummy"); startedTime = Time.realtimeSinceStartup;// time check
			InitCharacterDummy( Entity.ModelObject.transform);
			InitWeaponDummy( Entity.ModelObject.transform);
			Debug.Log( "AsModel::InitialParts: end init character dummy. time = " + ( Time.realtimeSinceStartup - startedTime));// time check
			Entity.ModelObject.name = "Model";
			Entity.ModelObject.transform.parent = transform;
			Entity.ModelObject.transform.localPosition = Vector3.zero;
			Entity.ModelObject.transform.localRotation = Quaternion.identity;

			sITEMVIEW[] partsData = entity.getCharView;	
			sITEMVIEW[] cosPartsData = entity.getCosItemView;				
			m_PartsRoot.SetStrengthenCount( entity.getCharView[0].nStrengthenCount);
			
			PartsRoot.SetParts( entity.isCostumeOnOff, m_PartsRoot, Item.eEQUIP.Weapon, partsData[0], cosPartsData[0]);
			PartsRoot.SetParts( entity.isCostumeOnOff, m_PartsRoot, Item.eEQUIP.Head, partsData[1], cosPartsData[1]);
			PartsRoot.SetParts( entity.isCostumeOnOff, m_PartsRoot, Item.eEQUIP.Armor, partsData[2], cosPartsData[2]);
			PartsRoot.SetParts( entity.isCostumeOnOff, m_PartsRoot, Item.eEQUIP.Gloves, partsData[3], cosPartsData[3]);
			PartsRoot.SetParts( entity.isCostumeOnOff, m_PartsRoot, Item.eEQUIP.Point, partsData[4], cosPartsData[4]);
			
			PartsRoot.SetParts( entity.isCostumeOnOff, m_PartsRoot, Item.eEQUIP.Fairy, null, cosPartsData[Inventory.fairyEquipSlotIdx]);
			PartsRoot.SetParts( entity.isCostumeOnOff, m_PartsRoot, Item.eEQUIP.Wing, null, cosPartsData[Inventory.wingEquipSlotIdx]);
			SetPartsUseItemId( Item.eEQUIP.Hair, entity.getHairItemIndex);
			
			Debug.Log( "AsModel::InitialParts: begin GenerateParts dummy"); startedTime = Time.realtimeSinceStartup;// time check
			m_PartsRoot.GenerateParts();
			Debug.Log( "AsModel::InitialParts: end GenerateParts. time = " + ( Time.realtimeSinceStartup - startedTime));// time check
		}
	}