// public void SetShopUId( uint _uid) // { // m_ShopUId = _uid; // } public void SetShopData( body2_SC_PRIVATESHOP_LIST _info) { m_ShopUId = _info.nPrivateShopUID; m_ShopContent = _info.strContent; string name = System.Text.Encoding.UTF8.GetString( _info.strName); SetProperty( eComponentProperty.NAME, name.Trim( '\0')); SetProperty( eComponentProperty.SHOP_OPENING, true); // Debug.Log( "AsUserEntity::SetShopData: [" + FsmType + "] m_ShopTitle = " + new string( m_ShopTitle)); }
public OtherCharacterAppearData(body2_SC_PRIVATESHOP_LIST _data) { creationType_ = eCreationType.OTHER_CHAR_APPEAR; charName_ = ""; sessionKey_ = AsPStoreManager.s_ShopOpeningSession; uniqKey_ = _data.nCharUniqKey; curPosition_ = _data.sCurPosition; destPosition_ = _data.sCurPosition; // Debug.Log("OtherCharacterAppearData::ctor: pos = " + _data.sCurPosition); shopContent_ = _data.strContent; shopOpening_ = true; shopUId_ = _data.nPrivateShopUID; Debug.Log("OtherCharacterAppearData::ctor: [log off]Shop opening(id:" + uniqKey_); }
public new void PacketBytesToClass( byte[] data) { Type infotype = this.GetType(); FieldInfo headerinfo = null; int index = ParsePacketHeader( data); byte[] count = new byte[ sizeof( Int32)]; headerinfo = infotype.GetField( "nShopCnt", BINDING_FLAGS_PIG); Buffer.BlockCopy( data, index, count, 0, sizeof( Int32)); headerinfo.SetValue( this, BitConverter.ToInt32( count, 0)); index += sizeof( Int32); if( 0 >= nShopCnt) return; body = new body2_SC_PRIVATESHOP_LIST[ nShopCnt]; for( int i = 0; i < nShopCnt; i++) { body[i] = new body2_SC_PRIVATESHOP_LIST(); byte[] tmpData = new byte[ body2_SC_PRIVATESHOP_LIST.size]; Buffer.BlockCopy( data, index, tmpData, 0, tmpData.Length); body[i].ByteArrayToClass( tmpData); index += body2_SC_PRIVATESHOP_LIST.size; } }