예제 #1
0
    private void ObjectJump(byte[] _packet)
    {


        body_SC_OBJECT_JUMP data = new body_SC_OBJECT_JUMP();
        data.PacketBytesToClass(_packet);

        AsNpcEntity npcEntity = AsEntityManager.Instance.GetNpcEntityBySessionId(data.nNpcIdx);
        if (null == npcEntity)
        {
            Debug.LogError("null == npcEntity [ nNpcIdx : " + data.nNpcIdx);
            return;
        }

       	AsUserEntity userEntity = AsEntityManager.Instance.GetUserEntityByUniqueId(data.nCharUniqKey);
		if( null == userEntity )
		{
			Debug.LogError("null == userEntity [ nCharUniqKey : " + data.nCharUniqKey);
			return;
		}

		Msg_ObjStepping msg = new Msg_ObjStepping( ObjStepping.eSTEPPIG_STATE.JUMP_START );
		msg.m_AsObjectEntity = npcEntity;
		userEntity.HandleMessage(msg);

		Debug.Log("SC_OBJECT_JUMP [ npcIdx : " + data.nNpcIdx + " nCharUniqKey : " + data.nCharUniqKey );
    }
예제 #2
0
    //--------------------------------------------------------------------------------------------------
    /* Object Jump */
    //--------------------------------------------------------------------------------------------------




    private void ObjectJumpResult(byte[] _packet)
    {
        body_SC_OBJECT_JUMP_RESULT data = new body_SC_OBJECT_JUMP_RESULT();
        data.PacketBytesToClass(_packet);

        if (eRESULTCODE.eRESULT_SUCC != data.eResult)
        {
            //AsNotify.Instance.MessageBox("Object jump failed", null, "", AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_ERROR);
            return;
        }

        AsNpcEntity npcEntity = AsEntityManager.Instance.GetNpcEntityBySessionId(data.nNpcIdx);
        if (null == npcEntity)
        {
            Debug.LogError("null == npcEntity [ nNpcIdx : " + data.nNpcIdx);
            return;
        }

        AsEntityManager.Instance.UserEntity.linkIndex_ = npcEntity.GetProperty<int>(eComponentProperty.LINK_INDEX);
		Msg_ObjStepping msg = new Msg_ObjStepping(ObjStepping.eSTEPPIG_STATE.JUMP_START);
		msg.m_AsObjectEntity = npcEntity;
		AsEntityManager.Instance.UserEntity.HandleMessage( msg );
    }