IEnumerator BuffAccure_CR(Msg_CharBuffAccure _accure) { while(true) { if( null == UserEntity.ModelObject) yield return null; else { if( m_AccureDodge != 0 && _accure.info_.bDodgeChance == false) { AsEffectManager.Instance.StopEffect(m_AccureDodge); m_AccureDodge = 0; } if( m_AccureDodge == 0 && _accure.info_.bDodgeChance == true) m_AccureDodge = AsEffectManager.Instance.PlayEffect( "FX/Effect/COMMON/Fx_Common_DodgeChance", UserEntity.ModelObject.transform, false, 0f); if( m_AccureCritical != 0 && _accure.info_.bCriticalChance == false) { AsEffectManager.Instance.StopEffect(m_AccureCritical); m_AccureCritical = 0; } if( m_AccureCritical == 0 && _accure.info_.bCriticalChance == true) m_AccureCritical = AsEffectManager.Instance.PlayEffect( "FX/Effect/COMMON/Fx_Common_CriticalChance", UserEntity.ModelObject.transform, false, 0f); break; } } }
public void SetCreationData( OtherCharacterAppearData _data) { sessionId_ = (int)_data.sessionKey_; uniqueId_ = (int)_data.uniqKey_; m_SessionId = _data.sessionKey_; m_UniqueId = _data.uniqKey_; if( m_ShopUId == uint.MaxValue && _data.shopUId_ != uint.MaxValue) m_ShopUId = _data.shopUId_; if( m_ShopContent == null) { string content = "null"; if( _data.shopContent_ != null) content = System.Text.UTF8Encoding.UTF8.GetString( _data.shopContent_); Debug.Log( "AsUserEntity::SetCreationData: previous shop content is null. set by OtherCharacterAppearData.shopContent[" + content + "]"); m_ShopContent = _data.shopContent_; } else { Debug.Log( "AsUserEntity::SetCreationData: previous shop content is " + System.Text.UTF8Encoding.UTF8.GetString( m_ShopContent) + ". ignore shop content."); } #region -Designation designationID = _data.designationID; #endregion #region -AccountGender #if !NEW_DELEGATE_IMAGE userGender = _data.userGender; #endif #endregion #region -GMMark isGM = _data.isGM; #endregion SetProperty( eComponentProperty.NAME, AsUtil.GetRealString( _data.charName_)); SetProperty( eComponentProperty.GUILD_NAME, AsUtil.GetRealString( _data.guildName_)); SetProperty( eComponentProperty.RACE, _data.race_); SetProperty( eComponentProperty.CLASS, _data.class_); SetProperty( eComponentProperty.GENDER, _data.gender_); SetProperty( eComponentProperty.LEVEL, _data.level_); if( GetProperty<bool>( eComponentProperty.SHOP_OPENING) == false) { SetProperty( eComponentProperty.SHOP_OPENING, _data.shopOpening_); // Debug.Log( "AsUserEntity::SetCreationData: [" + _data.uniqKey_ + "]eComponentProperty.SHOP_OPENING = " + _data.shopOpening_); } Vector3 pos = _data.curPosition_; pos.y += 0.1f; transform.position = pos; transform.rotation = Quaternion.AngleAxis( 180, Vector3.up); SetProperty( eComponentProperty.HP_CUR, _data.hpCur_); SetProperty( eComponentProperty.HP_MAX, _data.hpMax_); SetProperty( eComponentProperty.MOVE_SPEED , _data.moveSpeed_); if (_data.notRegisterMgr == false) AsEntityManager.Instance.RegisterUserCharacter( this); m_iHairItemIndex = _data.hair_ + _data.hairColor_; m_sCharView = new sITEMVIEW[AsGameDefine.ITEM_SLOT_VIEW_COUNT]; if( _data.surverData != null) { m_bCostumeOnOff = _data.surverData.bCostumeOnOff; m_sCharView[0] = _data.surverData.sNormalItemVeiw_1; m_sCharView[1] = _data.surverData.sNormalItemVeiw_2; m_sCharView[2] = _data.surverData.sNormalItemVeiw_3; m_sCharView[3] = _data.surverData.sNormalItemVeiw_4; m_sCharView[4] = _data.surverData.sNormalItemVeiw_5; } m_sCosItemView = new sITEMVIEW[AsGameDefine.ITEM_SLOT_COS_VIEW_COUNT]; if( _data.surverData != null) { m_sCosItemView[0] = _data.surverData.sCosItemView_1; m_sCosItemView[1] = _data.surverData.sCosItemView_2; m_sCosItemView[2] = _data.surverData.sCosItemView_3; m_sCosItemView[3] = _data.surverData.sCosItemView_4; m_sCosItemView[4] = _data.surverData.sCosItemView_5; m_sCosItemView[5] = _data.surverData.sCosItemView_6; m_sCosItemView[6] = _data.surverData.sCosItemView_7; } m_Hide = _data.hide_; //m_nPvpPoint = _data.nPvpPoint_; m_nYesterdayPvpRank = _data.nYesterdayPvpRank; m_nYesterdayPvpPoint = _data.nYesterdayPvpPoint; m_nYesterdayPvpRankRate = _data.nYesterdayPvpRankRate; #if NEW_DELEGATE_IMAGE nUserDelegateImageIndex = _data.nDelegateImageTableIndex; #else m_nRankPoint = _data.nRankPoint_; #endif m_bSubTitleHide = _data.bSubTitleHide; buffAccure_ = new Msg_CharBuffAccure( _data.criticalChance, _data.dodgeChance); HandleMessage( buffAccure_); }