BOOL CGBBSSychMessages::Write( SocketOutputStream& oStream )const
{
	__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_objID), sizeof(ObjID_t));
	oStream.Write( (CHAR*)(&m_Opt), sizeof(BYTE));
	switch(m_Opt)
	{
	case OPT_NEW_MESSAGE:
		{
			oStream.Write( (CHAR*)(&m_nLength), sizeof(BYTE));
			oStream.Write( (CHAR*)(m_MessageData), m_nLength);
		}
		break;
	case OPT_REPLY_MESSAGE:
		{
			oStream.Write( (CHAR*)(&m_nID), sizeof(UINT));
			oStream.Write( (CHAR*)(&m_nLength), sizeof(BYTE));
			oStream.Write( (CHAR*)(m_MessageData), m_nLength);
		}
		break;
	case OPT_DEL_MESSAGE:
		{
			oStream.Write( (CHAR*)(&m_nID), sizeof(UINT));
		}
		break;
	case OPT_SET_TITLE:
		{
			oStream.Write( (CHAR*)(&m_nLength), sizeof(BYTE));
			oStream.Write( (CHAR*)(m_MessageData), m_nLength);
		}
		break;

	}

	return TRUE ;

	__LEAVE_FUNCTION

	return FALSE ;
}
示例#2
0
BOOL CGConnect::Write( SocketOutputStream& oStream )const
{
__ENTER_FUNCTION

    oStream.Write( (CHAR*)(&m_Key), sizeof(UINT) ) ;
    oStream.Write( (CHAR*)(&m_GUID), sizeof(GUID_t) ) ;
    oStream.Write( (CHAR*)(&m_ServerID), sizeof(ID_t) ) ;
    oStream.Write( (CHAR*)(&m_szAccount), sizeof(CHAR)*MAX_ACCOUNT ) ;
    oStream.Write( (CHAR*)(&m_nGender), sizeof(INT) ) ;
    oStream.Write( (CHAR*)(&m_nCheckVer), sizeof(INT) ) ;

    return TRUE ;

__LEAVE_FUNCTION

    return FALSE ;
}
BOOL GWSearchHorseFindMateInfo::Write( SocketOutputStream& oStream ) const
{
__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_szHorseName), sizeof(m_szHorseName) );
	oStream.Write( (CHAR*)(&m_iHorseLevel), sizeof(m_iHorseLevel));
	oStream.Write( (CHAR*)(&m_iHorseSex), sizeof(m_iHorseSex));
	oStream.Write( (CHAR*)(&m_iHorseGrowRate), sizeof(m_iHorseGrowRate));
	oStream.Write( (CHAR*)(&m_PlayerID), sizeof(m_PlayerID));
	oStream.Write( (CHAR*)(&m_iMaxPostion), sizeof(m_iMaxPostion));

	return TRUE;

__LEAVE_FUNCTION

	return FALSE;
}
示例#4
0
BOOL  LWAskCharLogin::Write( SocketOutputStream& oStream )const
{
    __ENTER_FUNCTION

    oStream.Write( (CHAR*)(&szAccount), sizeof(CHAR)*MAX_ACCOUNT);
    oStream.Write( (CHAR*)(&PlayerID), sizeof(PlayerID_t));
    oStream.Write( (CHAR*)(&PlayerGUID), sizeof(GUID_t));
    oStream.Write( (CHAR*)(&uKey), sizeof(UINT));
    oStream.Write( (CHAR*)(&AskStatus), sizeof(ASK_LOGINSTATUS));
    if(AskStatus == ALS_SENDDATA)
    {
        oStream.Write( (CHAR*)(&UserData), sizeof(FULLUSERDATA));
    }
    oStream.Write( (CHAR*)(&Age), sizeof(BYTE));

    return TRUE ;

    __LEAVE_FUNCTION

    return FALSE ;
}
BOOL GCNewPlayer_Move::Write( SocketOutputStream& oStream )const
{
__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_ObjID), sizeof(ObjID_t));
	oStream.Write( (CHAR*)(&m_nHandleID), sizeof(m_nHandleID));
	oStream.Write( (CHAR*)(&m_posWorld), sizeof(WORLD_POS));
	oStream.Write( (CHAR*)(&m_wEquipVer), sizeof(WORD));

	oStream.Write( (CHAR*)(&m_fMoveSpeed), sizeof(FLOAT));
	oStream.Write( (CHAR*)(&m_posTarget), sizeof(WORLD_POS));

	return TRUE ;

__LEAVE_FUNCTION

	return FALSE ;
}
示例#6
0
BOOL GCSouXiaList::Write( SocketOutputStream& oStream )const
{
	__ENTER_FUNCTION

	oStream.Write((CHAR*)(&m_nSouXiaCount),sizeof(BYTE));
	
	if(m_nSouXiaCount>MAX_SOUXIA_CONTAINER) 
	{
		Assert(FALSE);
	}

	for(INT i=0; i<m_nSouXiaCount; i++)
	{
		if (m_SouXiaData[i].m_CurPos >= 0 && m_SouXiaData[i].m_SouXiaID > 0)
		{
			m_SouXiaData[i].WriteSouXiaVarAttr(oStream);
		}
	}
	return TRUE ;

	__LEAVE_FUNCTION

		return FALSE ;
}
BOOL GWAskChangeScene::Write( SocketOutputStream& oStream ) const
{
__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_Status), sizeof(BYTE) ) ;
	oStream.Write( (CHAR*)(&m_PlayerID), sizeof(PlayerID_t) ) ;
	oStream.Write( (CHAR*)(&m_GUID), sizeof(GUID_t) ) ;
	oStream.Write( (CHAR*)(&m_SourSceneID), sizeof(SceneID_t) ) ;
	oStream.Write( (CHAR*)(&m_DestSceneID), sizeof(SceneID_t) ) ;
	if( m_Status==CSS_DIFFSERVER )
		oStream.Write( (CHAR*)(&m_UserData), sizeof(FULLUSERDATA) ) ;
	oStream.Write( (CHAR*)(&m_uKey), sizeof(UINT) ) ;

	return TRUE ;

__LEAVE_FUNCTION

	return FALSE ;
}
示例#8
0
BOOL LBAskAuth::Write( SocketOutputStream& oStream )const
{
	__ENTER_FUNCTION

	oStream.Write( (CHAR*)(szAccount), sizeof(CHAR)*MAX_ACCOUNT) ;
	oStream.Write( (CHAR*)(szPassWord), sizeof(CHAR)*MAX_MD5_SIZE);
	oStream.Write((CHAR*)(&PlayerID),sizeof(PlayerID_t));
	oStream.Write((CHAR*)(&szIP),sizeof(CHAR)*MAX_BILLING_IP_SIZE);
	for(INT i = 0; i < MIBAOUNIT_NUMBER; ++i)
	{
		oStream.Write( (CHAR*)(mAllMiBaoKey[i]),sizeof(CHAR)*MIBAOUNIT_NAME_LENGTH);
	}
	for(INT i = 0; i < MIBAOUNIT_NUMBER; ++i)
	{
		oStream.Write( (CHAR*)(mAllMiBaoValue[i]),sizeof(CHAR)*MIBAOUNIT_VALUE_LENGTH);
	}
	oStream.Write( (CHAR*)(mMacAddr), sizeof(CHAR)*MAX_MD5_SIZE);
	return TRUE ;

	__LEAVE_FUNCTION

	return FALSE ;
}
示例#9
0
BOOL LCRetCharList::Write( SocketOutputStream& oStream )const
{
	__ENTER_FUNCTION

	oStream.Write((CHAR*)(&Result),sizeof(ASKCHARLIST_RESULT));

	if(Result == ASKCHARLIST_SUCCESS)
	{
		oStream.Write( (CHAR*)(&szAccount), sizeof(CHAR)*MAX_ACCOUNT);
		
		if(uCharNumber>DB_CHAR_NUMBER)
		{
			Assert(FALSE);
			UCHAR RealNumber = DB_CHAR_NUMBER;
			oStream.Write((CHAR*)(&RealNumber),sizeof(UCHAR));
			for(UINT i =0;i<RealNumber;i++)
			{	
				oStream.Write((CHAR*)(&CharList[i]),sizeof(DB_CHAR_BASE_INFO));
			}
		}
		else
		{
			oStream.Write((CHAR*)(&uCharNumber),sizeof(UCHAR));
			for(UINT i =0;i<uCharNumber;i++)
			{	
				oStream.Write((CHAR*)(&CharList[i]),sizeof(DB_CHAR_BASE_INFO));
			}
		}
	}
		
	return TRUE ;

	__LEAVE_FUNCTION

		return FALSE ;
}
示例#10
0
BOOL GCBBSMessages::Write( SocketOutputStream& oStream )const
{
	__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_objID), sizeof(ObjID_t));
	oStream.Write( (CHAR*)(&m_Serial), sizeof(UINT));
	oStream.Write( (CHAR*)(&m_nTitleLength), sizeof(BYTE));
	oStream.Write( (CHAR*)(m_szTitle), m_nTitleLength);
	oStream.Write( (CHAR*)(&m_MessageNum), sizeof(BYTE));
	for(UINT i=0; i<m_MessageNum; i++)
	{
		oStream.Write( (CHAR*)(m_MessageData[i].AuthorName), MAX_BBS_MESSAGE_AUTHORLENGTH);
		oStream.Write( (CHAR*)(&m_MessageData[i].nID), sizeof(UINT));
		oStream.Write( (CHAR*)(&m_MessageData[i].nHour), sizeof(BYTE));
		oStream.Write( (CHAR*)(&m_MessageData[i].nMin), sizeof(BYTE));
		oStream.Write( (CHAR*)(&m_MessageData[i].bHasReply), sizeof(BYTE));
		if(m_MessageData[i].bHasReply)
		{
			oStream.Write( (CHAR*)(&m_MessageData[i].nReHour), sizeof(BYTE));
			oStream.Write( (CHAR*)(&m_MessageData[i].nReMin), sizeof(BYTE));

			oStream.Write( (CHAR*)(&m_MessageData[i].nMsgLength), sizeof(BYTE));
			oStream.Write( (CHAR*)(m_MessageData[i].szMessage), m_MessageData[i].nMsgLength);

			oStream.Write( (CHAR*)(&m_MessageData[i].nReplyMsgLength), sizeof(BYTE));
			oStream.Write( (CHAR*)(m_MessageData[i].szReplyMessage), m_MessageData[i].nReplyMsgLength);
		}
		else
		{
			oStream.Write( (CHAR*)(&m_MessageData[i].nMsgLength), sizeof(BYTE));
			oStream.Write( (CHAR*)(m_MessageData[i].szMessage), m_MessageData[i].nMsgLength);
		}
	}
	return TRUE ;

	__LEAVE_FUNCTION

	return FALSE ;
}
VOID FINGER_BY_GUID::Write( SocketOutputStream &oStream ) const
{
	oStream.Write( (CHAR*)&m_TargetGUID, sizeof(m_TargetGUID) );
	oStream.Write( (CHAR*)&m_uOnlineFlag, sizeof(m_uOnlineFlag) );
}
示例#12
0
BOOL    WGTeamAskApply::Write(SocketOutputStream& oStream )    const
{
__ENTER_FUNCTION

    oStream.Write( (CHAR*)(&m_PlayerID), sizeof(PlayerID_t) );
    oStream.Write( (CHAR*)(&m_SourPlayerID), sizeof(PlayerID_t) );
    oStream.Write( (CHAR*)&m_SourGUID, sizeof(GUID_t) );
    oStream.Write( (CHAR*)&m_DestGUID, sizeof(GUID_t) );
    oStream.Write( (CHAR*)&m_SourNameSize, sizeof(UCHAR) );
    oStream.Write( (CHAR*)&m_DestNameSize, sizeof(UCHAR) );
    oStream.Write( (CHAR*)&m_GUID, sizeof(m_GUID) );

    if ( m_SourNameSize>0 )
    {
        oStream.Write((CHAR*)&m_SourName, m_SourNameSize);
    }

    if ( m_DestNameSize>0 )
    {
        oStream.Write((CHAR*)&m_DestName, m_DestNameSize);
    }

    oStream.Write( (CHAR*)&m_uFamily, sizeof(UINT) );
    oStream.Write( (CHAR*)&m_Scene, sizeof(SceneID_t) );
    oStream.Write( (CHAR*)&m_Level, sizeof(INT) );
    oStream.Write( (CHAR*)&m_uDataID, sizeof(m_uDataID) );

    return TRUE;

__LEAVE_FUNCTION

    return FALSE;
}
示例#13
0
VOID WG_RELATION::Write( SocketOutputStream& oStream ) const
{
    oStream.Write( (CHAR*)&m_PlayerID, sizeof(m_PlayerID) );
    oStream.Write( (CHAR*)&m_Type, sizeof(m_Type) );

    switch( m_Type )
    {
    case RET_RELATIONINFO:
        m_RelationInfo.Write( oStream );
        break;
    case RET_VIEWPLAYER:
        m_ViewPlayer.Write( oStream );
        break;
    case RET_TARGETNOTONLINE:
    case RET_RELATIONOFFLINE:
    case RET_DELFROMENEMY:
    case RET_DELFRIENDBYMAIL:
    case RET_DELFRIENDFORADDENEMY:
        m_RelationGUID.Write( oStream );
        break;
    case RET_ADDFRIEND:
    case RET_ADDTOBLACKLIST:
    case RET_TEMPFRIEND_TO_FRIEND:
    case RET_TEMPFRIEND_ADDTO_BLACKLIST:
    case RET_ADDENEMY:
        m_AddRelation.Write( oStream );
        break;
    case RET_ADDFRIENDNOTIFY:
    case RET_ASKADDFRIEND:
    case RET_REJECTADDFRIEND:
    case RET_ASKADDTOBLACKLIST:
    case RET_ASKTHROWTOFRIENDLIST:
    case RET_FRIENDADDPOINT:
        m_NotifyFriend.Write( oStream );
        break;
    case RET_ONLINELIST:
        m_RelationOnline.Write( oStream );
        break;
    case RET_RELATIONONLINE:
        m_NotifyOnline.Write( oStream );
        break;
    case RET_NOTIFY_ADDTEMPFRIEND:
        m_PlayerName.Write( oStream );
        break;
    case RET_NEW_GROUP:
        m_AddNewGroup.Write( oStream );
        break;
    case RET_ERR_TARGETNOTEXIST:
    case RET_ERR_ISFRIEND:
    case RET_ERR_ISBLACKNAME:
    case RET_ERR_SPOUSETOBLACKLIST:
    case RET_ERR_MASTERTOBLACKLIST:
    case RET_ERR_PRENTICETOBLACKLIST:
    case RET_ERR_BROTHERTOBLACKLIST:
    case RET_ERR_CANNOT_ADDFRIEND:
    case RET_ERR_CANNOTRECEIVEMAIL:
    case RET_ERR_NOTRECVSTRANGEMAIL:
        break;
    default:
        Assert(FALSE);
        return;
    }
}
示例#14
0
BOOL GCExchangeSynchII::Write( SocketOutputStream& oStream )const
{
	__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_IsMyself), sizeof(BYTE));
	oStream.Write( (CHAR*)(&m_Opt), sizeof(BYTE));

	if(m_IsMyself)
	{//给自己盒子里加东西
		switch (m_Opt)
		{
		case EXCHANGE_MSG::OPT_ADDITEM:
			{
				oStream.Write( (CHAR*)(&m_FromType), sizeof(BYTE));
				oStream.Write( (CHAR*)(&m_FromIndex), sizeof(BYTE));
				oStream.Write( (CHAR*)(&m_ToIndex), sizeof(BYTE));
			}
			break;
		case EXCHANGE_MSG::OPT_REMOVEITEM:
			{
				oStream.Write( (CHAR*)(&m_ToType), sizeof(BYTE));
				oStream.Write( (CHAR*)(&m_ToIndex), sizeof(BYTE));
				oStream.Write( (CHAR*)(&m_FromIndex), sizeof(BYTE));
			}
			break;
		case EXCHANGE_MSG::OPT_MONEY:
			{
				oStream.Write( (CHAR*)(&m_Money), sizeof(UINT));
			}
			break;
		case EXCHANGE_MSG::OPT_REMOVEMONEY:
			{
				oStream.Write( (CHAR*)(&m_Money), sizeof(UINT));
			}
			break;
		case EXCHANGE_MSG::OPT_ADDPET:
			{
				oStream.Write( (CHAR*)(&m_ToIndex), sizeof(BYTE));
				oStream.Write( (CHAR*)(&m_PetGuid), sizeof(PET_GUID_t));
			}
			break;
		case EXCHANGE_MSG::OPT_REMOVEPET:
			{
				oStream.Write( (CHAR*)(&m_PetGuid), sizeof(PET_GUID_t));
			}
			break;
		default:
			break;
		}
	}
	else
	{//给对方盒子里加东西
		switch (m_Opt)
		{
		case EXCHANGE_MSG::OPT_ADDITEM:
			{
				oStream.Write( (CHAR*)(&m_ToIndex), sizeof(BYTE));
				oStream.Write( (CHAR*)(&m_ExItem.isBlueEquip), sizeof(BYTE));
				oStream.Write( (CHAR*)(&m_ExItem.byNumber), sizeof(BYTE));
				if(m_ExItem.isBlueEquip)
				{
					m_ExItem.item_data.WriteItemVarAttr(oStream);
				}
				else
				{
					oStream.Write( (CHAR*)(&m_ExItem.uBagPos), sizeof(UINT));
				}
			}
			break;
		case EXCHANGE_MSG::OPT_REMOVEITEM:
			{
				oStream.Write( (CHAR*)(&m_FromIndex), sizeof(BYTE));
			}
			break;
		case EXCHANGE_MSG::OPT_MONEY:
			{
				oStream.Write( (CHAR*)(&m_Money), sizeof(UINT));
			}
			break;
		case EXCHANGE_MSG::OPT_REMOVEMONEY:
			{
				oStream.Write( (CHAR*)(&m_Money), sizeof(UINT));
			}
			break;
		case EXCHANGE_MSG::OPT_ADDPET:
			break;
		case EXCHANGE_MSG::OPT_REMOVEPET:
			{
				oStream.Write( (CHAR*)(&m_PetGuid), sizeof(PET_GUID_t));
			}
			break;
		default:
			break;
		}
	}
	return TRUE ;

	__LEAVE_FUNCTION

		return FALSE ;
}
示例#15
0
BOOL CGItemSynch::Write( SocketOutputStream& oStream )const
{
	__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_Opt), sizeof(BYTE));
	switch(m_Opt)
	{
	case OPT_MOVE_ITEM_AUTO:
		{
			oStream.Write( (CHAR*)(&m_FromType), sizeof(BYTE));
			switch(m_FromType)
			{
			case POS_BAG:
			case POS_EQUIP:
			case POS_BANK:
			case POS_PLAYERSHOP:
				{
					oStream.Write( (CHAR*)(&m_ToType), sizeof(BYTE));
					oStream.Write( (CHAR*)(&m_ItemGuid), sizeof(_ITEM_GUID));
				}
				break;
			case POS_PET:
				{
					oStream.Write( (CHAR*)(&m_ToType), sizeof(BYTE));
					oStream.Write( (CHAR*)(&m_PetGuid), sizeof(PET_GUID_t));
				}
				break;
			case POS_PLAYERSHOPPET:
				{
					oStream.Write( (CHAR*)(&m_ToType), sizeof(BYTE));
					oStream.Write( (CHAR*)(&m_PetGuid), sizeof(PET_GUID_t));
				}
				break;
			default:
				break;
			}
		}
		break;
	case OPT_MOVE_ITEM_MANU:
		{
			oStream.Write( (CHAR*)(&m_FromType), sizeof(BYTE));

			switch(m_FromType)
			{
			case POS_BAG:
			case POS_EQUIP:
			case POS_BANK:
			case POS_PLAYERSHOP:
				{
					oStream.Write( (CHAR*)(&m_ToType), sizeof(BYTE));
					oStream.Write( (CHAR*)(&m_ToIndex), sizeof(BYTE));
					oStream.Write( (CHAR*)(&m_ItemGuid), sizeof(_ITEM_GUID));
				}
				break;
			case POS_PET:
				{
					oStream.Write( (CHAR*)(&m_ToType), sizeof(BYTE));
					oStream.Write( (CHAR*)(&m_ToIndex), sizeof(BYTE));
					oStream.Write( (CHAR*)(&m_PetGuid), sizeof(PET_GUID_t));
				}
				break;
			case POS_PLAYERSHOPPET:
				{
					oStream.Write( (CHAR*)(&m_ToType), sizeof(BYTE));
					oStream.Write( (CHAR*)(&m_ToIndex), sizeof(BYTE));
					oStream.Write( (CHAR*)(&m_PetGuid), sizeof(PET_GUID_t));
				}
				break;
			default:
				break;
			}
		}
		break;
	default:
		break;
	}
	oStream.Write( (CHAR*)(&m_ExtraInfoLength), sizeof(BYTE));
	oStream.Write( (CHAR*)(m_ExtraInfoData), m_ExtraInfoLength);
	return TRUE ;

	__LEAVE_FUNCTION

		return FALSE ;
}
示例#16
0
BOOL GCDetailAttrib_Pet::Write( SocketOutputStream& oStream )const
{
__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_GUID), sizeof(m_GUID));
	oStream.Write( (CHAR*)(&m_nTradeIndex), sizeof(m_nTradeIndex));
	oStream.Write( (CHAR*)(&m_Flags), sizeof(m_Flags));

	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_OBJ_ID ) )
		oStream.Write( (CHAR*)(&m_ObjID), sizeof(m_ObjID));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_DATA_ID ) )
		oStream.Write( (CHAR*)(&m_nDataID), sizeof(m_nDataID));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_NAME ) )
	{
		oStream.Write( (CHAR*)(&m_byNameSize), sizeof(m_byNameSize));
		oStream.Write( (CHAR*)(m_szName), sizeof(CHAR) * m_byNameSize);
	}
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_AI_TYPE ) )
		oStream.Write( (CHAR*)(&m_nAIType), sizeof(m_nAIType));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_SPOUSE_GUID ) )
		oStream.Write( (CHAR*)(&m_SpouseGUID), sizeof(m_SpouseGUID));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_LEVEL ) )
		oStream.Write( (CHAR*)(&m_nLevel), sizeof(m_nLevel));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_EXP ) )
		oStream.Write( (CHAR*)(&m_nExp), sizeof(m_nExp));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_HP ) )
		oStream.Write( (CHAR*)(&m_nHP), sizeof(m_nHP));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_HPMAX ) )
		oStream.Write( (CHAR*)(&m_nHPMax), sizeof(m_nHPMax));

	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_LIFE ) )
		oStream.Write( (CHAR*)(&m_nLife), sizeof(m_nLife));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_GENERATION ) )
		oStream.Write( (CHAR*)(&m_byGeneration), sizeof(m_byGeneration));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_HAPPINESS ) )
		oStream.Write( (CHAR*)(&m_byHappiness), sizeof(m_byHappiness));

	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_ATT_PHYSICS ) )
		oStream.Write( (CHAR*)(&m_nAtt_Physics), sizeof(m_nAtt_Physics));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_ATT_MAGIC ) )
		oStream.Write( (CHAR*)(&m_nAtt_Magic), sizeof(m_nAtt_Magic));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_DEF_PHYSICS ) )
		oStream.Write( (CHAR*)(&m_nDef_Physics), sizeof(m_nDef_Physics));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_DEF_MAGIC ) )
		oStream.Write( (CHAR*)(&m_nDef_Magic), sizeof(m_nDef_Magic));

	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_HIT ) )
		oStream.Write( (CHAR*)(&m_nHit), sizeof(m_nHit));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_MISS ) )
		oStream.Write( (CHAR*)(&m_nMiss), sizeof(m_nMiss));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_CRITICAL ) )
		oStream.Write( (CHAR*)(&m_nCritical), sizeof(m_nCritical));

	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_MODELID ) )
		oStream.Write( (CHAR*)(&m_nModelID), sizeof(m_nModelID));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_MOUNTID ) )
		oStream.Write( (CHAR*)(&m_nMountID), sizeof(m_nMountID));

	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_STRPERCEPTION ) )
		oStream.Write( (CHAR*)(&m_StrPerception), sizeof(m_StrPerception));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_CONPERCEPTION ) )
		oStream.Write( (CHAR*)(&m_ConPerception), sizeof(m_ConPerception));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_DEXPERCEPTION ) )
		oStream.Write( (CHAR*)(&m_DexPerception), sizeof(m_DexPerception));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_SPRPERCEPTION ) )
		oStream.Write( (CHAR*)(&m_SprPerception), sizeof(m_SprPerception));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_INTPERCEPTION ) )
		oStream.Write( (CHAR*)(&m_IntPerception), sizeof(m_IntPerception));

	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_STR ) )
		oStream.Write( (CHAR*)(&m_Str), sizeof(m_Str));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_CON ) )
		oStream.Write( (CHAR*)(&m_Con), sizeof(m_Con));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_DEX ) )
		oStream.Write( (CHAR*)(&m_Dex), sizeof(m_Dex));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_SPR ) )
		oStream.Write( (CHAR*)(&m_Spr), sizeof(m_Spr));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_INT ) )
		oStream.Write( (CHAR*)(&m_Int), sizeof(m_Int));
	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_GENGU ) )
		oStream.Write( (CHAR*)(&m_GenGu), sizeof(m_GenGu));

	if ( m_Flags.isSetBit(PET_DETAIL_ATTR_POINT_REMAIN ) )
		oStream.Write( (CHAR*)(&m_nRemainPoint), sizeof(m_nRemainPoint));

	if ( m_Flags.isSetBit( PET_DETAIL_ATTR_SKILL_0 ) )
		oStream.Write( (CHAR*)(&m_aSkill[0]), sizeof( _OWN_SKILL ) );

	if ( m_Flags.isSetBit( PET_DETAIL_ATTR_SKILL_1 ) )
		oStream.Write( (CHAR*)(&m_aSkill[1]), sizeof( _OWN_SKILL ) );

	if ( m_Flags.isSetBit( PET_DETAIL_ATTR_SKILL_2 ) )
		oStream.Write( (CHAR*)(&m_aSkill[2]), sizeof( _OWN_SKILL ) );

	if ( m_Flags.isSetBit( PET_DETAIL_ATTR_SKILL_3 ) )
		oStream.Write( (CHAR*)(&m_aSkill[3]), sizeof( _OWN_SKILL ) );

	if ( m_Flags.isSetBit( PET_DETAIL_ATTR_SKILL_4 ) )
		oStream.Write( (CHAR*)(&m_aSkill[4]), sizeof( _OWN_SKILL ) );

	if ( m_Flags.isSetBit( PET_DETAIL_ATTR_SKILL_5 ) )
		oStream.Write( (CHAR*)(&m_aSkill[5]), sizeof( _OWN_SKILL ) );

	oStream.Write( (CHAR*)(&m_ExtraInfoLength), sizeof(BYTE));
	oStream.Write( (CHAR*)(m_ExtraInfoData), m_ExtraInfoLength);

	return TRUE ;

__LEAVE_FUNCTION

	return FALSE ;
}
示例#17
0
VOID RELATION_GUID_UCHAR::Write( SocketOutputStream &oStream ) const
{
    oStream.Write( (CHAR*)&m_TargetGUID, sizeof(m_TargetGUID) );
    oStream.Write( (CHAR*)&m_uRelationType, sizeof(m_uRelationType) );
}
示例#18
0
BOOL	GCTeamAskInvite::Write(SocketOutputStream& oStream )	const
{
__ENTER_FUNCTION

	oStream.Write( (CHAR*)&m_GUID, sizeof(GUID_t) );
	oStream.Write( (CHAR*)&m_uMemberSize, sizeof(UCHAR) );

	for( INT i=0; i<m_uMemberSize; ++i )
	{
		oStream.Write( (CHAR*)&(m_InviterInfo[i].m_DetailFlag), sizeof(UCHAR) );
		oStream.Write( (CHAR*)&(m_InviterInfo[i].m_NickSize), sizeof(UCHAR) );

		if ( m_InviterInfo[i].m_NickSize>0 )
		{
			oStream.Write( (CHAR*)&(m_InviterInfo[i].m_szNick), sizeof(CHAR) * m_InviterInfo[i].m_NickSize );
		}

		oStream.Write( (CHAR*)&m_InviterInfo[i].m_uFamily, sizeof(UINT) );
		oStream.Write( (CHAR*)&m_InviterInfo[i].m_Scene, sizeof(SceneID_t) );
		oStream.Write( (CHAR*)&m_InviterInfo[i].m_Level, sizeof(INT) );
		oStream.Write( (CHAR*)&m_InviterInfo[i].m_uDataID, sizeof(USHORT) );

		if ( m_InviterInfo[i].m_DetailFlag>0 )
		{
			oStream.Write( (CHAR*)&m_InviterInfo[i].m_WeaponID, sizeof(UINT) );
			oStream.Write( (CHAR*)&m_InviterInfo[i].m_CapID, sizeof(UINT) );
			oStream.Write( (CHAR*)&m_InviterInfo[i].m_ArmourID, sizeof(UINT) );
			oStream.Write( (CHAR*)&m_InviterInfo[i].m_CuffID, sizeof(UINT) );
			oStream.Write( (CHAR*)&m_InviterInfo[i].m_FootID, sizeof(UINT) );
			oStream.Write( (CHAR*)&m_InviterInfo[i].m_uFaceMeshID, sizeof(UINT) );
			oStream.Write( (CHAR*)&m_InviterInfo[i].m_uHairMeshID, sizeof(UINT) );
			oStream.Write( (CHAR*)&m_InviterInfo[i].m_uHairColor, sizeof(UINT) );
		}
	}

	return TRUE;

__LEAVE_FUNCTION

	return FALSE;
}
示例#19
0
VOID GC_RELATION::Write( SocketOutputStream& oStream ) const
{
    oStream.Write( (CHAR*)&m_Type, sizeof(m_Type) );

    switch( m_Type )
    {
    case RET_RELATIONLIST:
        m_RelationList.Write(oStream);
        break;
    case RET_RELATIONINFO:
        m_RelationInfo.Write(oStream);
        break;
    case RET_VIEWPLAYER:
        m_ViewPlayer.Write( oStream );
        break;
    case RET_ADDFRIEND:
    case RET_ADDTOBLACKLIST:
    case RET_TEMPFRIEND_TO_FRIEND:
    case RET_TEMPFRIEND_ADDTO_BLACKLIST:
    case RET_ADDENEMY:
        m_NewRelation.Write(oStream);
        break;
    case RET_TRANSITION:
        m_RelationGUIDUCHARUCHAR.Write(oStream);
        break;
    case RET_DELFRIEND:
    case RET_DELFROMBLACKLIST:
    case RET_RELATIONOFFLINE:
    case RET_DELFROMENEMY:
    case RET_DELFRIENDBYMAIL:
    case RET_DELFRIENDFORADDENEMY:
        m_RelationGUID.Write(oStream);
        break;
    case RET_ADDFRIENDNOTIFY:
    case RET_ASKADDFRIEND:
    case RET_REJECTADDFRIEND:
    case RET_ASKADDTOBLACKLIST:
    case RET_ASKTHROWTOFRIENDLIST:
    case RET_FRIENDADDPOINT:
        m_NotifyFriend.Write( oStream );
        break;
    case RET_ONLINELIST:
        m_RelationOnline.Write( oStream );
        break;
    case RET_RELATIONONLINE:
        m_NotifyOnline.Write( oStream );
        break;
    case RET_NEWMOOD:
        m_NewMood.Write( oStream );
        break;
    case RET_NOTIFY_ADDTEMPFRIEND:
        m_PlayerName.Write( oStream );
        break;
    case RET_NEW_GROUP:
        m_AddNewGroup.Write( oStream );
        break;
    case RET_ERR_TARGETNOTEXIST:
    case RET_ERR_GROUPISFULL:
    case RET_ERR_ISFRIEND:
    case RET_ERR_ISBLACKNAME:
    case RET_ERR_CANNOTTRANSITION:
    case RET_ERR_ISNOTFRIEND:
    case RET_ERR_ISNOTINBLACKLIST:
    case RET_ERR_SPOUSETOBLACKLIST:
    case RET_ERR_MASTERTOBLACKLIST:
    case RET_ERR_PRENTICETOBLACKLIST:
    case RET_ERR_BROTHERTOBLACKLIST:
    case RET_ERR_DELSPOUSE:
    case RET_ERR_DELMASTER:
    case RET_ERR_DELPRENTICE:
    case RET_ERR_DELBROTHER:
    case RET_ERR_PASSWDMISMATCH:
    case RET_ERR_CANNOT_ADDFRIEND:
    case RET_ERR_CANNOTRECEIVEMAIL:
    case RET_ERR_NOTRECVSTRANGEMAIL:
    case RET_ERR_FRIENDGROUPISFULL:
    case RET_ERR_BLACKGROUPISFULL:
    case RET_ERR_RELATIONUNKNOWN:
        break;
    default :
        Assert(FALSE);
        return;
    };
}
示例#20
0
VOID REQUEST_DEL_FRIEND_MAIL::Write( SocketOutputStream& oStream ) const
{
    oStream.Write( (CHAR*)&m_GUID, sizeof(m_GUID) );
    oStream.Write( (CHAR*)&m_TIME, sizeof(m_TIME) );
}
示例#21
0
VOID _RELATION::Write( SocketOutputStream &oStream ) const
{
    oStream.Write( (CHAR*)&m_GUID, sizeof(m_GUID) );
    oStream.Write( (CHAR*)&m_uNameSize, sizeof(m_uNameSize) );

    if( m_uNameSize > 0 && m_uNameSize < sizeof(m_szName) )
    {
        oStream.Write(m_szName, m_uNameSize);
    }

    oStream.Write( (CHAR*)&m_nLevel, sizeof(m_nLevel) );
    oStream.Write( (CHAR*)&m_nMenPai, sizeof(m_nMenPai) );
    oStream.Write( (CHAR*)&m_nPortrait, sizeof(m_nPortrait) );
    oStream.Write( (CHAR*)&m_GuildID, sizeof(m_GuildID) );
    oStream.Write( (CHAR*)&m_uGuildNameSize, sizeof(m_uGuildNameSize) );

    if( m_uGuildNameSize > 0 && m_uGuildNameSize < sizeof(m_szGuildName) )
    {
        oStream.Write(m_szGuildName, m_uGuildNameSize);
    }

    oStream.Write( (CHAR*)&m_uOnlineFlag, sizeof(m_uOnlineFlag) );

    if( m_uOnlineFlag > 0 )
    {
        oStream.Write( (CHAR*)&m_uMoodSize, sizeof(m_uMoodSize) );

        if( m_uMoodSize > 0 && m_uMoodSize < sizeof(m_szMood) )
        {
            oStream.Write(m_szMood, m_uMoodSize);
        }

        oStream.Write( (CHAR*)&m_uTitleSize, sizeof(m_uTitleSize) );

        if( m_uTitleSize > 0 && m_uTitleSize < sizeof(m_szTitle) )
        {
            oStream.Write(m_szTitle, m_uTitleSize);
        }

        oStream.Write( (CHAR*)&m_SceneID, sizeof(m_SceneID) );
        oStream.Write( (CHAR*)&m_uTeamSize, sizeof(m_uTeamSize) );
    }
    oStream.Write( (CHAR*)&m_point, sizeof(m_point) );
}
示例#22
0
VOID REQUEST_MODIFY_SETTINGS::Write( SocketOutputStream &oStream ) const
{
    oStream.Write( (CHAR*)&m_uSettings, sizeof(m_uSettings) );
}
VOID GW_FINGER::Write( SocketOutputStream& oStream ) const
{
	oStream.Write( (CHAR*)&m_GUID, sizeof(m_GUID) );
	CG_FINGER::Write( oStream );
}
示例#24
0
VOID RELATION_GUID::Write( SocketOutputStream &oStream ) const
{
    oStream.Write( (CHAR*)&m_TargetGUID, sizeof(m_TargetGUID) );
}
VOID WG_FINGER::Write( SocketOutputStream& oStream ) const
{
	oStream.Write( (CHAR*)&m_PlayerID, sizeof(m_PlayerID) );
	GC_FINGER::Write( oStream );
}
示例#26
0
VOID REQUEST_ADD_RELATION_WITH_GROUP::Write( SocketOutputStream &oStream ) const
{
    REQUEST_ADD_RELATION::Write( oStream );

    oStream.Write( (CHAR*)&m_uGroup, sizeof(m_uGroup) );
}
BOOL GCCharBaseAttrib::Write( SocketOutputStream& oStream )const
{
__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_ObjID), sizeof(ObjID_t));
	oStream.Write( (CHAR*)(&m_uFlags), sizeof(UINT));

	if ( m_uFlags & (1 << UPDATE_CHAR_ATT_DATA_ID) )
		oStream.Write( (CHAR*)(&m_wDataID), sizeof(m_wDataID));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_NAME) )
	{
		oStream.Write( (CHAR*)(&m_byNameSize), sizeof(m_byNameSize));
		oStream.Write( (CHAR*)(m_szName), sizeof(CHAR) * m_byNameSize);
	}

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_TITLE) )
	{
		oStream.Write( (CHAR*)(&m_TitleType), sizeof(m_TitleType));
		oStream.Write( (CHAR*)(&m_byTitleSize), sizeof(m_byTitleSize));
		oStream.Write( (CHAR*)(m_szTitle), sizeof(CHAR) * m_byTitleSize);
	}

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_LEVEL) )
		oStream.Write( (CHAR*)(&m_Level), sizeof(m_Level));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_HP_PERCENT) )
		oStream.Write( (CHAR*)(&m_HPPercent), sizeof(m_HPPercent));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_MP_PERCENT) )
		oStream.Write( (CHAR*)(&m_MPPercent), sizeof(m_MPPercent));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_RAGE) )
		oStream.Write( (CHAR*)(&m_nRage), sizeof(m_nRage));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_STEALTH_LEVEL) )
		oStream.Write( (CHAR*)(&m_nStealthLevel), sizeof(m_nStealthLevel));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_SIT) )
		oStream.Write( (CHAR*)(&m_cMoodState), sizeof(m_cMoodState));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_MOVE_SPEED) )
		oStream.Write( (CHAR*)(&m_fMoveSpeed), sizeof(m_fMoveSpeed));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_ATTACK_SPEED) )
		oStream.Write( (CHAR*)(&m_fAttackSpeed), sizeof(m_fAttackSpeed));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_CAMP_ID) )
		oStream.Write( (CHAR*)(&m_CampData), sizeof(m_CampData));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_PORTRAIT_ID) )
		oStream.Write( (CHAR*)(&m_nPortraitID), sizeof(m_nPortraitID));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_MODEL_ID) )
		oStream.Write( (CHAR*)(&m_nModelID), sizeof(m_nModelID));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_MOUNT_ID) )
		oStream.Write( (CHAR*)(&m_nMountID), sizeof(m_nMountID));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_AITYPE) )
		oStream.Write( (CHAR*)(&m_nAIType), sizeof(m_nAIType));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_PLAYER_DATA) )
	{
		oStream.Write( (CHAR*)(&m_uPlayerData), sizeof(m_uPlayerData));
		oStream.Write( (CHAR*)(&m_HairColor), sizeof(m_HairColor));
	}

	if ( m_uFlags & (1<<UPDATE_CHAR_IS_IN_STALL) )
		oStream.Write( (CHAR*)(&m_bStallIsOpen), sizeof(m_bStallIsOpen));

	if ( m_uFlags & (1<<UPDATE_CHAR_STALL_NAME) )
	{
		oStream.Write( (CHAR*)(&m_nStallNameSize), sizeof(m_nStallNameSize));
		oStream.Write( (CHAR*)(m_szStallName), m_nStallNameSize);
		Assert(m_nStallNameSize<MAX_STALL_NAME) ;
	}

	if ( m_uFlags & (1<<UPDATE_CHAR_OCCUPANT) )
		oStream.Write( (CHAR*)(&m_OccupantGUID), sizeof(m_OccupantGUID));

	if ( m_uFlags & (1<<UPDATE_CHAR_OWNER) )
		oStream.Write( (CHAR*)(&m_OwnerID), sizeof(m_OwnerID));

	if ( m_uFlags & (1<<UPDATE_CHAR_ISNPC) )
		oStream.Write( (CHAR*)(&m_IsNPC), sizeof(m_IsNPC));

	return TRUE ;

__LEAVE_FUNCTION

	return FALSE ;
}
示例#28
0
BOOL	GCTeamAskApply::Write(SocketOutputStream& oStream )	const
{
__ENTER_FUNCTION

	oStream.Write( (CHAR*)&m_SourGUID, sizeof(GUID_t) );
	oStream.Write( (CHAR*)&m_DestGUID, sizeof(GUID_t) );
	oStream.Write( (CHAR*)&m_SourNameSize, sizeof(UCHAR) );
	oStream.Write( (CHAR*)&m_DestNameSize, sizeof(UCHAR) );

	if ( m_SourNameSize>0 )
	{
		oStream.Write((CHAR*)&m_SourName, m_SourNameSize);
	}

	if ( m_DestNameSize>0 )
	{
		oStream.Write((CHAR*)&m_DestName, m_DestNameSize);
	}

	oStream.Write( (CHAR*)&m_uFamily, sizeof(UINT) );
	oStream.Write( (CHAR*)&m_Scene, sizeof(SceneID_t) );
	oStream.Write( (CHAR*)&m_Level, sizeof(INT) );
	oStream.Write( (CHAR*)&m_DetailFlag, sizeof(UCHAR) );
	oStream.Write( (CHAR*)&m_uDataID, sizeof(USHORT) );

	if ( m_DetailFlag>0 )
	{
		oStream.Write( (CHAR*)&m_WeaponID, sizeof(UINT) );
		oStream.Write( (CHAR*)&m_CapID, sizeof(UINT) );
		oStream.Write( (CHAR*)&m_ArmourID, sizeof(UINT) );
		oStream.Write( (CHAR*)&m_CuffID, sizeof(UINT) );
		oStream.Write( (CHAR*)&m_FootID, sizeof(UINT) );
		oStream.Write( (CHAR*)&m_uFaceMeshID, sizeof(m_uFaceMeshID) );
		oStream.Write( (CHAR*)&m_uHairMeshID, sizeof(m_uHairMeshID) );
		oStream.Write( (CHAR*)&m_uHairColor, sizeof(m_uHairColor) );
	}

	return TRUE;

__LEAVE_FUNCTION

	return FALSE;
}
示例#29
0
BOOL GCCharBaseAttrib::Write( SocketOutputStream& oStream )const
{
__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_ObjID), sizeof(ObjID_t));
	oStream.Write( (CHAR*)(&m_uFlags), sizeof(UINT));

	if ( m_uFlags & (1 << UPDATE_CHAR_ATT_JOB) )
		oStream.Write( (CHAR*)(&m_Job), sizeof(m_Job));

	if ( m_uFlags & (1 << UPDATE_CHAR_ATT_COUNTRY) )
		oStream.Write( (CHAR*)(&m_Country), sizeof(m_Country));

	if ( m_uFlags & (1 << UPDATE_CHAR_ATT_DATA_ID) )
		oStream.Write( (CHAR*)(&m_wDataID), sizeof(m_wDataID));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_NAME) )
	{
		oStream.Write( (CHAR*)(&m_byNameSize), sizeof(m_byNameSize));
		oStream.Write( (CHAR*)(m_szName), sizeof(CHAR) * m_byNameSize);
	}

    if ( m_uFlags & (1<<UPDATE_CHAR_ATT_COUNTRYTITLE) )
    {
        oStream.Write( (CHAR*)(&m_CountryTitleType), sizeof(m_CountryTitleType));
        oStream.Write( (CHAR*)(&m_byCountryTitleSize), sizeof(m_byCountryTitleSize));
        oStream.Write( (CHAR*)(m_szCountryTitle), sizeof(CHAR) * m_byCountryTitleSize);
    }

    if ( m_uFlags & (1<<UPDATE_CHAR_ATT_GUILDTITLE) )
    {
        oStream.Write( (CHAR*)(&m_GuildTitleType), sizeof(m_GuildTitleType));
        oStream.Write( (CHAR*)(&m_byGuildTitleSize), sizeof(m_byGuildTitleSize));
        oStream.Write( (CHAR*)(m_szGuildTitle), sizeof(CHAR) * m_byGuildTitleSize);
    }

    if ( m_uFlags & (1<<UPDATE_CHAR_ATT_NORMALTITLE) )
    {
        oStream.Write( (CHAR*)(&m_NormalTitleType), sizeof(m_NormalTitleType));
        oStream.Write( (CHAR*)(&m_byNormalTitleSize), sizeof(m_byNormalTitleSize));
        oStream.Write( (CHAR*)(m_szNormalTitle), sizeof(CHAR) * m_byNormalTitleSize);
    }

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_LEVEL) )
		oStream.Write( (CHAR*)(&m_Level), sizeof(m_Level));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_HP_PERCENT) )
		oStream.Write( (CHAR*)(&m_HPPercent), sizeof(m_HPPercent));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_MP_PERCENT) )
		oStream.Write( (CHAR*)(&m_MPPercent), sizeof(m_MPPercent));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_PNEUMA_PERCENT) )
		oStream.Write( (CHAR*)(&m_PneumaPercent), sizeof(m_PneumaPercent));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_RAGE) )
		oStream.Write( (CHAR*)(&m_nRage), sizeof(m_nRage));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_STEALTH_LEVEL) )
		oStream.Write( (CHAR*)(&m_nStealthLevel), sizeof(m_nStealthLevel));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_SIT) )
		oStream.Write( (CHAR*)(&m_cMoodState), sizeof(m_cMoodState));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_MOVE_SPEED) )
		oStream.Write( (CHAR*)(&m_fMoveSpeed), sizeof(m_fMoveSpeed));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_ATTACK_SPEED) )
		oStream.Write( (CHAR*)(&m_fAttackSpeed), sizeof(m_fAttackSpeed));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_CAMP_ID) )
		oStream.Write( (CHAR*)(&m_CampData), sizeof(m_CampData));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_PORTRAIT_ID) )
		oStream.Write( (CHAR*)(&m_nPortraitID), sizeof(m_nPortraitID));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_MODEL_ID) )
		oStream.Write( (CHAR*)(&m_nModelID), sizeof(m_nModelID));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_MOUNT_ID) )
		oStream.Write( (CHAR*)(&m_nMountID), sizeof(m_nMountID));

    //  [7/23/2010 ³Â¾üÁú]
	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_MOUNT_INDEX) )
		oStream.Write( (CHAR*)(&m_nMountID), sizeof(m_nMountIndex));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_AITYPE) )
		oStream.Write( (CHAR*)(&m_nAIType), sizeof(m_nAIType));

	if ( m_uFlags & (1<<UPDATE_CHAR_ATT_PLAYER_DATA) )
	{
		oStream.Write( (CHAR*)(&m_uPlayerData), sizeof(m_uPlayerData));
		oStream.Write( (CHAR*)(&m_HairColor), sizeof(m_HairColor));
	}

	if ( m_uFlags & (1<<UPDATE_CHAR_IS_IN_STALL) )
		oStream.Write( (CHAR*)(&m_bStallIsOpen), sizeof(m_bStallIsOpen));

	if ( m_uFlags & (1<<UPDATE_CHAR_STALL_PUBLIC) )
		oStream.Write( (CHAR*)(&m_bOpenPublic), sizeof(m_bOpenPublic));

	if ( m_uFlags & (1<<UPDATE_CHAR_STALL_NAME) )
	{
		oStream.Write( (CHAR*)(&m_nStallNameSize), sizeof(m_nStallNameSize));
		oStream.Write( (CHAR*)(m_szStallName), m_nStallNameSize);
		Assert(m_nStallNameSize<MAX_STALL_NAME) ;
	}

	if ( m_uFlags & (1<<UPDATE_CHAR_OCCUPANT) )
		oStream.Write( (CHAR*)(&m_OccupantGUID), sizeof(m_OccupantGUID));

	if ( m_uFlags & (1<<UPDATE_CHAR_OWNER) )
		oStream.Write( (CHAR*)(&m_OwnerID), sizeof(m_OwnerID));

	if ( m_uFlags & (1<<UPDATE_CHAR_BUSOBJID) )
		oStream.Write( (CHAR*)(&m_BusID), sizeof(m_BusID));

	return TRUE ;

__LEAVE_FUNCTION

	return FALSE ;
}
示例#30
0
BOOL WGChat::Write( SocketOutputStream& oStream )const
{
	__ENTER_FUNCTION

	oStream.Write( (CHAR*)(&m_ChatType), sizeof(BYTE) ) ;

	oStream.Write( (CHAR*)(&m_ContexSize), sizeof(BYTE) ) ;
	if( m_ContexSize>0 && m_ContexSize<=MAX_CHAT_SIZE )
		oStream.Write( (CHAR*)(&m_Contex), sizeof(CHAR)*m_ContexSize ) ;
	
	oStream.Write( (CHAR*)(&m_SourNameSize), sizeof(BYTE) ) ;
	if( m_SourNameSize>0 && m_SourNameSize<=MAX_CHARACTER_NAME )
		oStream.Write( (CHAR*)(&m_SourName), sizeof(CHAR)*m_SourNameSize ) ;

	if( m_ChatType == CHAT_TYPE_SYSTEM ||
		m_ChatType == CHAT_TYPE_WORLD )
	{
	}
	else if(	//m_ChatType == CHAT_TYPE_CHANNEL || 
				m_ChatType == CHAT_TYPE_TEAM || 
				m_ChatType == CHAT_TYPE_USER ||
				m_ChatType == CHAT_TYPE_SELF
				)
	{
	 	oStream.Write( (CHAR*)(&m_PlayerID), sizeof(PlayerID_t) ) ;
	}
	else if( m_ChatType == CHAT_TYPE_GUILD )
	{
	 	oStream.Write( (CHAR*)(&m_GuildID), sizeof(GuildID_t) ) ;
	}
	else if( m_ChatType == CHAT_TYPE_JIAZU )
	{
	 	oStream.Write( (CHAR*)(&m_GuildID), sizeof(GuildID_t) ) ;
	 	oStream.Write( (CHAR*)(&m_JiaZuID), sizeof(JiaZuID_t) ) ;
	}
	else if( m_ChatType == CHAT_TYPE_COUNTRY )
	{
	 	oStream.Write( (CHAR*)(&m_CountryID), sizeof(CountryID_t) ) ;
	}
	else
	{
		Assert(FALSE) ;
	}
	oStream.Write( (CHAR*)(&m_uWorldChatID), sizeof(UINT) ) ;
	oStream.Write( (CHAR*)(&m_ChatShowPos), sizeof(BYTE) ) ;
	
	return TRUE ;

	__LEAVE_FUNCTION

	return FALSE ;
}